Repository navigation
feat: reusable workflow resolving generated-file conflicts - #14
Merged
Merged
Conversation
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.
With "require branches up to date" off, the one thing that still forces a PR update is a merge conflict, and most are in generated files: platform-api's
schema.json(7 of the last 30 merged PRs) and the frontends' API types (8–10 of the last 30 in each frontend). Two PRs that each regenerate them conflict as soon as the first merges.On every push to main, this finds open same-repo, non-bot PRs that are CONFLICTING. If every conflicted file is in the caller's
generated-paths, it merges main, takes main's copy of those files, runsregen-commandso the PR's own changes come back, and pushes. Any other conflict is left for a human.Needs a GitHub App token: pushes made with GITHUB_TOKEN don't start workflow runs, so CI would never rerun. The callers pass
CI_APP_ID/CI_APP_PRIVATE_KEY; the app needs contents: write and pull-requests: read on each calling repo, and the secrets must be available to it (org secrets, or per repo).