@@ -101,41 +101,35 @@ jobs:
101101
102102 # Check if patch output exists and contains branch info
103103 if [ -f patch_output.log ]; then
104- if grep -q "already exists" patch_output.log && grep -q "already contains commit" patch_output.log ; then
105- # Branch exists and has the commit
104+ if grep -q "already exists" patch_output.log; then
105+ # Branch exists - let user review
106106 BRANCH=$(grep "Hotfix branch" patch_output.log | grep "already exists" | sed 's/.*Hotfix branch \(.*\) already exists.*/\1/')
107107 gh pr comment ${{ github.event.inputs.original_pr }} --body "ℹ️ Patch branch already exists!
108108
109- The commit is already included in the existing patch branch: \`$BRANCH\`
109+ A patch branch already exists: [ \`$BRANCH\`](https://github.com/${{ github.repository }}/tree/$BRANCH)
110110
111- Check if there's already a PR for this patch: https://github.com/${{ github.repository }}/pulls?q=is%3Apr+is%3Aopen+head%3A$BRANCH"
111+ Please review this existing branch. If it's correct, check for an existing PR:
112+ [View patch PRs for this branch](https://github.com/${{ github.repository }}/pulls?q=is%3Apr+head%3A$BRANCH)
112113
113- elif grep -q "already exists" patch_output.log; then
114- # Branch exists but doesn't have the commit
115- BRANCH=$(grep "Hotfix branch" patch_output.log | grep "already exists" | sed 's/.*Hotfix branch \(.*\) already exists.*/\1/')
116- gh pr comment ${{ github.event.inputs.original_pr }} --body "⚠️ Patch branch exists but needs update!
117-
118- A patch branch \`$BRANCH\` exists but doesn't contain this commit. You may need to manually handle this conflict.
119-
120- View the existing branch: https://github.com/${{ github.repository }}/tree/$BRANCH"
114+ If the branch is incorrect or outdated, please delete it manually and run the patch command again."
121115
122116 elif [ "$EXIT_CODE" = "0" ]; then
123117 # Success - new branch created
124118 gh pr comment ${{ github.event.inputs.original_pr }} --body "🚀 Patch PR created!
125119
126120 The patch release PR for this change has been created. Please review and approve it to complete the patch release:
127121
128- View all patch PRs: https://github.com/${{ github.repository }}/pulls?q=is%3Apr+is%3Aopen+label%3Apatch"
122+ [ View all patch PRs]( https://github.com/${{ github.repository }}/pulls?q=is%3Apr+is%3Aopen+label%3Apatch) "
129123 else
130124 # Other error
131125 gh pr comment ${{ github.event.inputs.original_pr }} --body "❌ Patch creation failed!
132126
133127 There was an error creating the patch. Please check the workflow logs for details:
134- https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
128+ [View workflow run]( https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) "
135129 fi
136130 else
137131 gh pr comment ${{ github.event.inputs.original_pr }} --body "❌ Patch creation failed!
138132
139133 No output was generated. Please check the workflow logs:
140- https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
134+ [View workflow run]( https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) "
141135 fi
0 commit comments