From a9c935dc4f26d90a7a6b332d4e661b212a2f09cf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Jan 2026 01:36:41 +0000 Subject: [PATCH] refactor: improve PR body text and error pattern matching Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com> --- .github/workflows/version_branch.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/version_branch.yml b/.github/workflows/version_branch.yml index 3f2fe98..577ec15 100644 --- a/.github/workflows/version_branch.yml +++ b/.github/workflows/version_branch.yml @@ -640,9 +640,7 @@ jobs: fi cat > /tmp/pr_body.txt <<'PRBODY' - Automated pull request created for version branch. - - This PR was automatically created by the version branch workflow. + This pull request was automatically created by the version branch workflow. PRBODY # Add dynamic content @@ -672,10 +670,10 @@ jobs: echo "[WARN] Failed to create pull request (exit code: ${PR_EXIT_CODE})" >&2 echo "[WARN] Output: ${PR_OUTPUT}" >&2 - # Check for common error conditions - if echo "${PR_OUTPUT}" | grep -iq "already exists"; then - echo "[INFO] PR likely already exists, continuing..." >&2 - elif echo "${PR_OUTPUT}" | grep -iq "no commits between"; then + # Check for common error conditions with specific patterns + if echo "${PR_OUTPUT}" | grep -iqE "pull request.*already exists"; then + echo "[INFO] PR already exists, continuing..." >&2 + elif echo "${PR_OUTPUT}" | grep -iqE "no commits between.*branch"; then echo "[INFO] No commits between branches, continuing..." >&2 else echo "[WARN] Unexpected error occurred, but continuing workflow" >&2