Skip to content

feat: reusable workflow resolving generated-file conflicts - #14

Merged
cohenrobinson merged 1 commit into
mainfrom
feat/resolve-generated-conflicts
Oct 10, 2026
Merged

cohenrobinson merged 1 commit into
mainfrom
feat/resolve-generated-conflicts

Conversation

@cohenrobinson

Copy link
Copy Markdown
Contributor

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, runs regen-command so 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).

@cohenrobinson
cohenrobinson merged commit 6d0cfa3 into main Oct 10, 2026
1 check passed
@cohenrobinson
cohenrobinson deleted the feat/resolve-generated-conflicts branch October 10, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant