actions-label-merge-conflict
actions-label-merge-conflict copied to clipboard
request changes in PR with merge conflicts
The ultimate goal is to send notifications to a user. I hoped that adding labels does the trick but it doesn't.
Seems like we have to fallback to comments anyway. I think reviews are a good place for that since they're dismissable. But simple comments might be sufficient (though harder to query).
Initial idea for a query leveraging reviews:
query {
repository(owner:"mui-org", name:"material-ui") {
pullRequests(states:OPEN,first:100) {
nodes {
reviews(author:"eps1lon",states:CHANGES_REQUESTED) {
nodes {
id
}
}
}
}
}
}
If the PR is mergable dismiss this review. Otherwise add a review requesting changes.
Plain comments work pretty well IMO: https://github.com/pypa/pip/pull/8086#issuecomment-625487715
Plain comments work pretty well IMO: pypa/pip#8086 (comment)
I prefer using PRs for discussion. Comments from bots make the conversation hard to read which is why I try to avoid them as much as possible.
comments, reviews, labels.... is all a matter of personal preference. I'd rather have an action do one thing instead 10 at the same time and provide me information so I can conditionally chain other actions. Here is a PR that adds the output so people can then chain with additional actions. https://github.com/eps1lon/actions-label-merge-conflict/pull/17
Thanks @baywet! Do you have any example of how to actually use the output set by this action to do $things with it?
not at hand, it's in a private repo. But you need to give an id to the task (right below the name for example) so you can use the output variable in the following tasks
steps:
- name: check if prs are dirty
uses: eps1lon/actions-label-merge-conflict@main
id: check
- name: task2
if: check.prDirtyStatuses[prIdVariable] == true