Repository navigation
fix: make the monthly framework update workflow reviewable - #175
Merged
Merged
Conversation
peter-evans/create-pull-request was called without a token, so it fell back to GITHUB_TOKEN. GitHub deliberately suppresses workflow triggers for events raised by that token to avoid recursive runs, so ci.yml's pull_request trigger never fired on these PRs. The effect is visible on every one opened so far: joplin#172 had zero check runs and a mergeStateStatus of UNSTABLE, which is why they sat unmerged. Nobody wants to approve a 22 file api change with no signal. Use FRAMEWORK_UPDATE_TOKEN when it is set, falling back to github.token so an unconfigured repository keeps working exactly as before rather than failing the run. The secret still needs creating for CI to actually run on these PRs.
branch-suffix: timestamp gave each monthly run its own branch, so the action always created a new pull request instead of updating the open one. generator-joplin publishes far less often than this workflow runs, so the queue filled with duplicates: joplin#168, joplin#170 and joplin#172 were byte identical, all for a framework snapshot that had not changed since June. Dropping the suffix restores the action's normal behaviour of updating the existing PR in place, which leaves one rolling PR to review. delete-branch is already set, so the branch is still cleaned up once the PR is merged or closed.
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.
What
Two independent fixes to
.github/workflows/update-framework.yml, one commit each:peter-evans/create-pull-requestso CI runs on the PRs it opens.branch-suffix: timestampso it updates one rolling PR instead of opening a new one every month.Why
Together these explain why the automated framework PRs pile up unreviewed.
No CI. Without a
token, the action falls back toGITHUB_TOKEN, and GitHub deliberately suppresses workflow triggers for events raised by that token to stop workflows recursing into themselves. Soci.yml'spull_requesttrigger has never fired on any of these PRs. Measurable on #172:UNSTABLEwith zero checks, not failing checks. A 22 file api surface change with no signal at all is a reasonable thing for a reviewer to balk at.Duplicate PRs.
generator-joplinpublishes far less often than this workflow runs. It last released 3.7.2 on 16 June and has not moved since, so the July, August and September runs all produced identical output. #168, #170 and #172 were byte-identical (verified withshasumovergh pr diff), and #162 differed only because it predates the June release. With a timestamp suffix each run got its own branch, so the action created a new PR rather than updating the open one.How
token: ${{ secrets.FRAMEWORK_UPDATE_TOKEN || github.token }}uses the secret when it is set and falls back to the current behaviour when it is not, so an unconfigured repo keeps working instead of failing the run.Removing
branch-suffixrestores the action's normal behaviour of updating the existing PR in place.delete-branch: trueis already set, so cleanup on merge or close is unaffected.Both changes are commented in the workflow, since neither is obvious from the YAML and both look like reasonable settings at a glance.
This needs a repo secret to take full effect.
FRAMEWORK_UPDATE_TOKENshould be a PAT or app token withreposcope. Until it exists the workflow keeps running, just without CI, as today.#162, #168 and #170 are now closed and #172 is merged, so the next scheduled run on 1 October will open a single fresh PR against the fixed branch name.