Add pull_request synchronize trigger so workflows run when new commits are pushed to PR#5572
Merged
Add pull_request synchronize trigger so workflows run when new commits are pushed to PR#5572
pull_request synchronize trigger so workflows run when new commits are pushed to PR#5572Conversation
…s are pushed to PR
pull_request synchronize trigger so workflows run when new commits are pushed to PR
camdecoster
approved these changes
Apr 14, 2026
Contributor
camdecoster
left a comment
There was a problem hiding this comment.
Good to know about synchronize!
Contributor
Author
Yup! I don't know why they gave it that name, but now we know. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of change
Add
synchronizeto the list ofpull_requestevents which trigger the workflow to run.Also add the list of
pull_requesttriggers inbuild-doc.ymlfor consistency (this list is the same as the default so there's no actual change in behavior).Also restricts the
pushevent to apply only to themainbranch; otherwise, pushing to a branch in the repo which also has an open PR causes the workflow to run twice.The
synchronizeevent occurs when new commits are added to the head branch of a PR.Without this trigger, the workflows will run when a PR is first opened (or reopened), but will not run again when new commits are pushed.
I had assumed the
pushevent would cover this case, but it seems that event only triggers for branches within the repository, not for forks. Thus we need to usepull_request synchronize.N.b. the exact meaning of each event type is very poorly documented, but this comment confirms the meaning of
synchronize.