Open matthijskooijman opened 4 years ago
I think in theory this should work:
on:
issue:
types: [labeled]
name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && github.event.label == 'needs_rebase'
# the rest is the same
Did some tests using labels: https://github.com/Paulomart/rebase-test/pull/2 The actions runs when the label is set and removes it when the action is run.
Problem here is that, the pull_request event is not trigged when the pr has conflicts.
Problem here is that, the pull_request event is not trigged when the pr has conflicts.
Hm, that sounds weird. Is that documented? Or is this a bug in GH?
Yeah there is an answer in the support forum https://github.community/t/run-actions-on-pull-requests-with-merge-conflicts/17104/2
Might be good to send in feedback to GH as suggested in the last post, in case nobody did so already (and otherwise to give the issue a bit more priority). Also, consider tracking your feedback at https://github.com/isaacs/github/issues
To reduce the noise on a PR from a /rebase comment, it might be interesting to let the rebase be triggered by a label. E.g.:
I suspect that this might not actually need any changes to the action itself, just a different workflow configuration (this would require a way to remove a label, but it seems there is an action for that, or it could be done using github-script).
Anyone tried this already?