refactor: improve PR body text and error pattern matching

Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-09 01:36:41 +00:00
parent a12da2ad57
commit a9c935dc4f

View File

@@ -640,9 +640,7 @@ jobs:
fi fi
cat > /tmp/pr_body.txt <<'PRBODY' cat > /tmp/pr_body.txt <<'PRBODY'
Automated pull request created for version branch. This pull request was automatically created by the version branch workflow.
This PR was automatically created by the version branch workflow.
PRBODY PRBODY
# Add dynamic content # Add dynamic content
@@ -672,10 +670,10 @@ jobs:
echo "[WARN] Failed to create pull request (exit code: ${PR_EXIT_CODE})" >&2 echo "[WARN] Failed to create pull request (exit code: ${PR_EXIT_CODE})" >&2
echo "[WARN] Output: ${PR_OUTPUT}" >&2 echo "[WARN] Output: ${PR_OUTPUT}" >&2
# Check for common error conditions # Check for common error conditions with specific patterns
if echo "${PR_OUTPUT}" | grep -iq "already exists"; then if echo "${PR_OUTPUT}" | grep -iqE "pull request.*already exists"; then
echo "[INFO] PR likely already exists, continuing..." >&2 echo "[INFO] PR already exists, continuing..." >&2
elif echo "${PR_OUTPUT}" | grep -iq "no commits between"; then elif echo "${PR_OUTPUT}" | grep -iqE "no commits between.*branch"; then
echo "[INFO] No commits between branches, continuing..." >&2 echo "[INFO] No commits between branches, continuing..." >&2
else else
echo "[WARN] Unexpected error occurred, but continuing workflow" >&2 echo "[WARN] Unexpected error occurred, but continuing workflow" >&2