Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions .github/workflows/auto-merge-content-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,30 @@ jobs:
core.setFailed(`Auto-merge failed: ${error.message}`);
}

- name: Comment merge result
comment-result:
name: Comment Merge Result
needs: [detect-small-changes, auto-merge]
if: always() && needs.detect-small-changes.outputs.is-small-change == 'true'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Comment merge success
uses: mshick/add-pr-comment@v2
if: always()
if: needs.auto-merge.result == 'success'
with:
message: |
${{ steps.auto-merge-pr.outcome == 'success' && '✅ **Auto-merge completed successfully!**' || '❌ **Auto-merge failed** - Please check the workflow logs for details.' }}
✅ **Auto-merge completed successfully!**

This PR was automatically merged as a small content change.
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: true
allow-repeats: true

- name: Comment merge failure
uses: mshick/add-pr-comment@v2
if: needs.auto-merge.result == 'failure'
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failure comment condition only checks for failure status, but the auto-merge job could also have cancelled or skipped statuses. Consider handling these additional states to ensure users receive feedback in all non-success scenarios.

Suggested condition:

if: needs.auto-merge.result != 'success'

This would catch failure, cancelled, and skipped states, providing feedback whenever the merge doesn't complete successfully.

Suggested change
if: needs.auto-merge.result == 'failure'
if: needs.auto-merge.result != 'success'

Copilot uses AI. Check for mistakes.
with:
message: |
❌ **Auto-merge failed** - Please check the workflow logs for details.
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: true
Loading