You've already forked library-registry
mirror of
https://github.com/arduino/library-registry.git
synced 2025-07-07 14:41:10 +03:00
Reduce likelihood of spurious merge conflict bot comment
Previously, the "Manage PRs" workflow made a comment suggesting to resolve the merge conflict after any failure to merge a pull request. This comment is worded in a way that makes it somewhat applicable to other causes, but still might cause the submitter to waste time unnecessarily trying to figure out how to merge a nonexistent merge conflict when the failure had a different cause. The 405 response is not specific to a failure due to merge conflict, but I believe that all failures due to merge conflict will result in a 405. This means that the check is not perfect, but will make spurious mentions of merge conflict resolution less likely at least. A review is requested from a maintainer any time the merge fails, so they will be able to investigate and provide assistance if necessary.
This commit is contained in:
8
.github/workflows/manage-prs.yml
vendored
8
.github/workflows/manage-prs.yml
vendored
@ -408,6 +408,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
pass: ${{ steps.merge.outcome == 'success' }}
|
pass: ${{ steps.merge.outcome == 'success' }}
|
||||||
|
status: ${{ steps.merge.outputs.status }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Approve pull request
|
- name: Approve pull request
|
||||||
@ -482,7 +483,8 @@ jobs:
|
|||||||
if: needs.merge.outputs.pass == 'false'
|
if: needs.merge.outputs.pass == 'false'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Comment on merge failure
|
- name: Comment on merge conflict
|
||||||
|
if: needs.merge.outputs.status == '405'
|
||||||
uses: octokit/request-action@v2.x
|
uses: octokit/request-action@v2.x
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@ -500,6 +502,10 @@ jobs:
|
|||||||
|
|
||||||
Once that is done, it will be merged automatically.
|
Once that is done, it will be merged automatically.
|
||||||
|
|
||||||
|
- name: Fail on unidentified merge failure
|
||||||
|
if: needs.merge.outputs.status != '405'
|
||||||
|
run: exit 1 # Trigger the `unexpected-fail` job
|
||||||
|
|
||||||
not-submission:
|
not-submission:
|
||||||
needs:
|
needs:
|
||||||
- parse
|
- parse
|
||||||
|
Reference in New Issue
Block a user