Skip to content

chore: reuse open sync PR instead of opening a new one each run#249

Merged
muhsinking merged 1 commit intomainfrom
mking/reuse-sync-openapi-pr
Apr 24, 2026
Merged

chore: reuse open sync PR instead of opening a new one each run#249
muhsinking merged 1 commit intomainfrom
mking/reuse-sync-openapi-pr

Conversation

@muhsinking
Copy link
Copy Markdown
Contributor

Summary

  • Switches the docs-sync workflow to a fixed sync-openapi branch and force-pushes each run, so consecutive openapi.yaml changes update the existing PR in mintlify-docs instead of stacking new ones.
  • Only calls gh pr create when no open PR exists for the branch; otherwise logs that the existing PR was updated.
  • Adds muhsinking to the assignee list for newly created sync PRs.

Notes / tradeoffs

  • Force-pushes to the sync-openapi branch — fine since it's bot-only, but any hand-edits to that branch would be overwritten.
  • If a sync PR is closed without merging, the next run will open a fresh PR (we only check --state open). This seemed like the right default — closing signals "don't want this" — but easy to change if we'd rather reopen.
  • Each sync replaces the previous diff rather than adding commits, so the PR always shows "current main → latest spec" instead of a running history of syncs.

Test plan

  • Merge, then push a no-op change to openapi.yaml and confirm a single PR opens in mintlify-docs.
  • Push a second change before merging the first and confirm the existing PR gets updated (no second PR).
  • Merge or close the PR, push another change, and confirm a fresh PR is created.

🤖 Generated with Claude Code

Use a fixed sync-openapi branch with a force-push and only create a PR
when one isn't already open, so repeated openapi.yaml changes update
the existing PR in mintlify-docs instead of stacking new ones.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@muhsinking muhsinking requested a review from ryanto April 24, 2026 15:12
@muhsinking muhsinking merged commit 446c6b4 into main Apr 24, 2026
5 checks passed
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.

2 participants