Rebuild scoped Rector after a pull request is merged#730
Merged
Conversation
Dispatches build_scoped_rector.yaml in rectorphp/rector-src, so rectorphp/rector picks up merged changes without waiting for the next commit to rector-src main. Requires rectorphp/rector-src#8188, which adds the workflow_dispatch trigger the run relies on.
Member
|
If latest commit in rector-src is a release tag, rebuild should not be allowed as it will fail due to retagging |
Member
Author
|
Good point! |
This was referenced Jul 14, 2026
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.
Merging a rule pull request here changes
rectorphp/rectoronly once something else lands inrector-srcmain and retriggers its build. This dispatches that build directly instead.New
.github/workflows/dispatch_build_scoped_rector.yaml:pull_request: closedfires on every close, so themerged == truecheck is what limits it to merges. Closed-without-merge dispatches nothing. Reuses theACCESS_TOKENsecret already used byrector.yaml.Merge rectorphp/rector-src#8188 first
build_scoped_rector.yamlhas noworkflow_dispatchtrigger today, sogh workflow runreturns HTTP 422 until rectorphp/rector-src#8188 lands. This pull request is inert but red on its own.Two things to verify before merging
ACCESS_TOKENneedsactions: writeonrectorphp/rector-src.rector.yamlonly uses it to push to this repository, so cross-repository scope is unconfirmed — worth one manualgh workflow runagainstrector-srcwith that token.The dispatch fires at merge time, but the build resolves
rector-phpunitdev-mainthrough Packagist, which can lag a merge by a few minutes. A dispatched build may rebuild against the previousmain. A Packagist update hook on this repository is the fix; not included here.