Repository navigation
ci: merge and publish API changes without a person - #28
Merged
Merged
Conversation
Alex (2026-11-07): the SDKs publish automatically whenever the public API of service-didit-verification changes in production. - bot-pull-requests.yml with .github/scripts/bot-pull-request.sh: starts ci.yml (workflow_dispatch, which needs no approval) on the spec sync and release-please pull requests and turns on auto-merge with squash; holds failed syncs, major versions and commits from people for a person (label needs-alex); starts the release workflows on main after a merge that started none. - ci.yml: one "CI passed" job for main's required status check. - Release workflows: a registry job waits until the registry serves the version, or fails (.github/scripts/wait-for-registry.sh). - DESIGN.md 3.1 and 13, CLAUDE.md and AGENTS.md describe it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub does not always report reasonCode MANUALLY_DISABLED for a disable done by hand, so the script now keys on the actor alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Codex review ( 💡 Code reviewReviewed commit: No blocking findings in commit Verdict: APPROVE |
Contributor
Author
|
Codex review ( 💡 Code reviewReviewed commit: No actionable findings in commit Verdict: APPROVE |
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.
Problem
Alex (2026-11-07): the SDKs must publish automatically whenever the public API of service-didit-verification changes.
Today every API change needs a person three times: approving CI on the bot's spec sync pull request (its
pull_requestrun sits ataction_required, because a pull request opened withGITHUB_TOKENin a public repository needs a maintainer's approval), merging the spec sync pull request, and merging the release-please pull request.mainhas no branch protection and auto-merge is off, so there is nothing safe to auto-merge against, and no release job checks that the registry actually serves the new version.Solution
.github/workflows/bot-pull-requests.yml(identical in all seven SDKs) runs.github/scripts/bot-pull-request.shwhen a Spec sync, release or CI run finishes, every 30 minutes as a safety net, and by hand. Forchore/spec-syncandrelease-please--*pull requests opened by the automation it:ci.ymlon the pull request's branch withworkflow_dispatch(exempt from the approval gate, no new token, no approval of runs); its checks land on the head commit;gh pr merge --auto --squash --match-head-commit), as the spec sync'sBEGIN_COMMIT_OVERRIDEblock needs, so GitHub merges only once the required check passes;needs-alex, one comment, auto-merge off) when the latest spec sync failed a check, when it asks for a major version (a release pull request for a new major, or a sync with!or aBREAKING CHANGE:footer; under the 11-06 policy an API change, breaking or not, isfeat(spec), a minor, and merges), when it has commits from people, or whenmainhas no required check. It leaves alone anything labelleddo-not-mergeand anything whose auto-merge a person turned off, and removes its own label once the reason is gone;mainwhen the newest commit has no run of them, because a merge made by aGITHUB_TOKENauto-merge starts no push workflow.ci.yml: oneCI passedjob that needs every CI job (the live sandbox tests excepted); it becomesmain's required status check after this merges.registryjob (no credentials, runs nothing from the release) waits until the registry serves the version, or fails the run (.github/scripts/wait-for-registry.sh, identical in all seven).docs/DESIGN.md3.1 and 13 (the same text in all seven),CLAUDE.mdandAGENTS.mddescribe it.server-sdk-spec-sync.yml(separate pull request): on a merge tomainthat changes an OpenAPI document it waits until docs.didit.me serves the merged bytes, then startsspec-sync.ymlhere. mintlify-docsmaindocuments only what production serves, so nothing ships before it is live. The daily schedule stays as the safety net.spec-sync.ymlandrelease-please-config.jsonare not touched.Verification
actionlint(with shellcheck) on every changed workflow andshellcheckon both scripts: clean.bot-pull-request.shagainst a fakeghin 16 scenarios: CI started and auto-merge on; failed sync, draft,!,BREAKING CHANGE:footer, commits from people, no required check and a new major each held with label and comment;do-not-merge, a person'sneeds-alexand a manual auto-merge off left alone; the automation's own label removed once cleared; catch-up starts only the release workflow with no run onmain's head.wait-for-registry.shagainst the live registries: PyPI 1.1.0, npm 2.1.0, proxy.golang.org v1.1.0, Maven Central 1.1.0, Packagist v2.1.1, RubyGems 2.1.2, NuGet Didit and Didit.Extensions.DependencyInjection 1.1.0 all found; a missing version fails with an error.🤖 Generated with Claude Code