-
Hi,
using the synchronize event, the workflow is correctly triggered every time that a new change is pushed, but not when I rebase my branch Which is the correct event to use to trigger the workflow when the base reference is updated? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
@elisa-dc,
OR
NOTE: |
Beta Was this translation helpful? Give feedback.
-
@brightran thanks a lot for your reply. I’ve tried the solution that you suggest, but it doesn’t look to be working to cover my specific use case:
My PR has been approved but in the meanwhile new commits have been merged on master Since we use a rebase strategy I might have the following situations:
|
Beta Was this translation helpful? Give feedback.
-
What is the meaning of “rebased to a newer version of master”? How do you do that? Here I have some suggestions may be helpful to you:
|
Beta Was this translation helpful? Give feedback.
-
@brightran thanks again for your reply. I’ve added some more information to my previous post in order to try to provide additional details on the unclear points. Using the “Update branch” indeed I see a synchronise event and the workflow triggered. Not sure if and which event is triggered in case of Rebase&Merge if our repo use a rebase strategy |
Beta Was this translation helpful? Give feedback.
-
Essentially, we can think of Rebase&Merge is pushing some new commits from a branch to another branch (other merge types are similar). This is a push event for the target branch. Another situation, if you want a workflow triggered to run on the pull_request event after Rebase&Merge, you can try using pull_request.closed event. You need to add this event to the workflow in the source branch before Rebase&Merge.
When a PR is merged, it is closed automatically. Then the pull_request.closed event triggers the workflow. |
Beta Was this translation helpful? Give feedback.
-
Hi How would you trigger a workflow when the Pull Request is merged to target branch . I want a workflow where when pull request is opened, updated, “merged” to target branch trigger a workflow. So essentially in my case I want PR merged workflow as well as the target branch (lets say develop, main) to also trigger a separate workflow when that happens. |
Beta Was this translation helpful? Give feedback.
@elisa-dc,
Essentially, we can think of Rebase&Merge is pushing some new commits from a branch to another branch (other merge types are similar). This is a push event for the target branch.
If you setup a workflow run on push event in the target branch, after Rebase&Merge, normally this workflow will be triggered.
Another situation, if you want a workflow triggered to run on the pull_request event after Rebase&Merge, you can try using pull_request.closed event. You need to add this event to the workflow in the source branch before Rebase&Merge.
When a PR is mer…