action-dependabot-auto-merge
action-dependabot-auto-merge copied to clipboard
Feature to add labels to auto-merged PR
Hello. I request a feature to add labels to auto-merged PR.
In a workflow in my project, after a PR is merged by action-dependabot-auto-merge
, another step adds a "automerge" label. This is a bit wasteful and complex.
interesting idea, but I don't think I'll work on adding that myself, but if you make a pull request with the functionality, i'll happily review it and ultimately merge it
Thanks.
I have another idea to achieve my goal (adding labels to auto-merged PR), so I'm wondering which way is good for the action-dependabot-auto-merge
.
- Receive
labels
as a new input of this action. Write some code to add labels in this action. -
Output
matched
,will-auto-merge
, or something (any good naming?) from this action. Subsequent steps look at the output and decide whether to add labels to the PR. (see below)
steps:
- uses: actions/checkout@v2
- uses: ahmadnassri/action-dependabot-auto-merge@v2
id: dependabot-auto-merge
with:
target: minor
github-token: ${{ secrets.mytoken }}
- name: Add a label
if: steps.dependabot-auto-merge.outputs.will-auto-merge == 'true'
run: gh pr edit --add-label 'automerge'
I think the second way is easy to implement and is better for alternate or more general needs. Do you have any good ideas?