Skip to content

ci: sign bot commits in OpenAPI spec sync workflow - #2733

Merged
gaprl merged 1 commit into
mainfrom
gabriellopes/openapi-sync-sign-commits
Jul 23, 2026
Merged

ci: sign bot commits in OpenAPI spec sync workflow#2733
gaprl merged 1 commit into
mainfrom
gabriellopes/openapi-sync-sign-commits

Conversation

@gaprl

@gaprl gaprl commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Why

The scheduled OpenAPI spec refresh (update-openapi-specs.yml, added in #2706) failed on its first run (29986258074): it fetched the specs, passed mintlify validate, and committed the diff, but the push was rejected —

remote: error: GH013: Repository rule violations found for refs/heads/chore/update-openapi-specs.
remote: - Commits must have verified signatures.

The repo's Require Signed Commits ruleset (targets all branches, no bypass actors) rejects the commit peter-evans/create-pull-request makes via the git CLI, which is unsigned regardless of token. Until the sync can push, the checked-in specs drift from production — e.g. includeFirstDetectedAt on ListIssuesRequest is live at https://semgrep.dev/api/v2/openapi.yaml but missing from the rendered API reference.

What

Add sign-commits: true to the create-pull-request step (supported at the pinned v8.1.1). The action then creates the commit through GitHub's GraphQL API, which GitHub auto-signs (verified as github-actions[bot], or the bot identity if DOCS_BOT_TOKEN is set), satisfying the ruleset.

Verification

  • actionlint passes on the modified workflow.
  • Config-only CI change — no tests apply.
  • Post-merge: trigger the workflow via workflow_dispatch; it should open the chore/update-openapi-specs sync PR, whose diff should include includeFirstDetectedAt.

Fixes APPEX-1455

The repo's 'Require Signed Commits' ruleset rejects the unsigned CLI
commit peter-evans/create-pull-request makes, so the scheduled spec
refresh failed on its first run (29986258074) and the checked-in specs
drifted from semgrep.dev. sign-commits: true makes the action commit
via the GraphQL API, which GitHub auto-signs.

Fixes APPEX-1455
@gaprl
gaprl enabled auto-merge (squash) July 23, 2026 19:08
@abhijna
abhijna self-requested a review July 23, 2026 19:58
@gaprl
gaprl merged commit fbc6c3e into main Jul 23, 2026
4 checks passed
@gaprl
gaprl deleted the gabriellopes/openapi-sync-sign-commits branch July 23, 2026 19: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.

2 participants