mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17407] Update comment in merge check if possible
PHPBB-17407
This commit is contained in:
parent
f80b41aa77
commit
1b0c9b22e0
1 changed files with 22 additions and 1 deletions
23
.github/workflows/check_merge_to_master.yml
vendored
23
.github/workflows/check_merge_to_master.yml
vendored
|
@ -42,8 +42,16 @@ jobs:
|
||||||
git merge --abort
|
git merge --abort
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Find Comment
|
||||||
|
uses: peter-evans/find-comment@v3
|
||||||
|
id: fc
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
|
comment-author: 'github-actions[bot]'
|
||||||
|
body-includes: The attempt to merge branch `3.3.x` into `master` has completed
|
||||||
|
|
||||||
- name: Post comment on PR
|
- name: Post comment on PR
|
||||||
if: always() # Ensure this step always runs, regardless of merge result
|
if: steps.fc.outputs.comment-id == ''
|
||||||
uses: peter-evans/create-or-update-comment@v4
|
uses: peter-evans/create-or-update-comment@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -55,6 +63,19 @@ jobs:
|
||||||
|
|
||||||
${{ steps.merge_master.outputs.mergeable == 'true' && 'This PR is ready to be merged.' || 'A separate PR will be needed to merge `3.3.x` into `master`.' }}
|
${{ steps.merge_master.outputs.mergeable == 'true' && 'This PR is ready to be merged.' || 'A separate PR will be needed to merge `3.3.x` into `master`.' }}
|
||||||
|
|
||||||
|
- name: Update comment on PR
|
||||||
|
if: steps.fc.outputs.comment-id != ''
|
||||||
|
uses: peter-evans/create-or-update-comment@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||||
|
body: |
|
||||||
|
The attempt to merge branch `3.3.x` into `master` has completed after considering the changes in this PR.
|
||||||
|
|
||||||
|
- Merge result: ${{ steps.merge_master.outputs.mergeable == 'true' && 'Success ✅' || 'Conflict ❌' }}
|
||||||
|
|
||||||
|
${{ steps.merge_master.outputs.mergeable == 'true' && 'This PR is ready to be merged.' || 'A separate PR will be needed to merge `3.3.x` into `master`.' }}
|
||||||
|
|
||||||
- name: Mark job as succeeded
|
- name: Mark job as succeeded
|
||||||
if: always()
|
if: always()
|
||||||
run: echo "Merge check completed. Ignoring the result to avoid failed status."
|
run: echo "Merge check completed. Ignoring the result to avoid failed status."
|
||||||
|
|
Loading…
Add table
Reference in a new issue