1
0
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:
per1234
2021-07-29 20:10:56 -07:00
parent 2636446064
commit 03bdfa7974

View File

@ -408,6 +408,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
pass: ${{ steps.merge.outcome == 'success' }}
status: ${{ steps.merge.outputs.status }}
steps:
- name: Approve pull request
@ -482,7 +483,8 @@ jobs:
if: needs.merge.outputs.pass == 'false'
runs-on: ubuntu-latest
steps:
- name: Comment on merge failure
- name: Comment on merge conflict
if: needs.merge.outputs.status == '405'
uses: octokit/request-action@v2.x
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -500,6 +502,10 @@ jobs:
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:
needs:
- parse