automerge-action
automerge-action copied to clipboard
Q: how to trigger automerge after the checks finish?
I assumed that check_suite type completed would be the check which runs after all checks passes. Howerver, it happened now twice: if PR reviews happens before the build check passes, then it's not being merged.
My config
name: automerge
on:
pull_request:
types:
- labeled
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
Merge not happening after the checks complete
Did you have a look at all the events that triggered automerge-action runs? It might be that the build sends the "status" event and not "check_suite"
Did you have a look at all the events that triggered automerge-action runs? It might be that the build sends the "status" event and not "check_suite"
I did try to look it up, but I couldn't find a reasonable event. I assumed one by default would use such an even so would know how it's called. Hence, posted here.
I will try to add
on:
status
Seems that status doesn't have any types
Yes, it doesn't have any types, see the usage example in the README: https://github.com/pascalgn/automerge-action#usage
Yes, it doesn't have any types, see the usage example in the README: pascalgn/automerge-action#usage
thank you
so i ended up adding
status: {}
and just tested, and it merged it! :) Thank you for your help and the auto-merger itself!
Yes, it doesn't have any types, see the usage example in the README: https://github.com/pascalgn/automerge-action#usage
Hi, I think it could be useful to add a comment like:
status: {} # necessary to trigger the action after the other checks have been completed
in the usage sample.
I also had this problem and I could not figure out what I was doing wrong, since github check_suite
event is quite misleading.
For me, status: {}
does not seem to work, so I went with a manual trigger at the end of the job in question:
# CI.yaml
...
# last step of the CI job
- name: Trigger automerge
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.TOKEN }} # generate a personal access token with `public_repo` scope (write access)
event-type: checks-complete
and then explicitly add this event as trigger to the automerge workflow:
# automerge.yaml
on:
# trigger when checks complete (manually triggered as final step of CI workflow)
repository_dispatch:
types: [checks-complete]
Same here. Sometimes it works; other times, it doesn't. Removing and reading the tags triggers the workflow, but the experience is not as smooth as it could be.