Automate spec drift response: open regen PR instead of issue - #55
Open
natestemen wants to merge 4 commits into
Open
Automate spec drift response: open regen PR instead of issue#55natestemen wants to merge 4 commits into
natestemen wants to merge 4 commits into
Conversation
When upstream OpenAPI spec diverges, fetch the new spec, regenerate the client, and open a PR assigned to ionq/developer-tools rather than filing an issue for someone to do manually. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
antalszava
previously approved these changes
Aug 18, 2026
Comment on lines
-18
to
-19
| with: | ||
| persist-credentials: false |
Contributor
There was a problem hiding this comment.
This change seems to make one of the CIs fail: https://github.com/ionq/ionq-core-python/actions/runs/26799220747/job/79002107172?pr=55
Contributor
Author
There was a problem hiding this comment.
The way things were set up meant that CI would not run when the PR got created. I fixed that by making the github actions runnable by dispatch, and in doing so this change got dropped.
Pushes and PRs made with GITHUB_TOKEN never fire pull_request events, so the regen PRs from the spec-drift workflow would sit unmergeable: main's ruleset requires the CI, staleness, and CodeQL checks. Rather than introduce a GitHub App or PAT, dispatch the required workflows directly on the regen branch — workflow_dispatch is exempt from GitHub's event suppression for GITHUB_TOKEN. - Restore persist-credentials: false on checkout (fixes the zizmor artipacked finding failing the Audit workflows check) - Replace the hand-rolled git push + gh pr bash with peter-evans/create-pull-request, authenticated by plain GITHUB_TOKEN - Add workflow_dispatch triggers to ci.yml and generated.yml so spec-drift.yml can kick them off on the regen branch - Drop the explicit team-reviewers request (GITHUB_TOKEN cannot request team reviews); CODEOWNERS already assigns ionq/developer-tools CodeQL uses GitHub's default setup and cannot be dispatched; verify it reports on the first regen PR. Assisted-By: Claude Fable 5 <noreply@anthropic.com>
GitHub Actions already runs unspecified run: steps with bash -e, and none of these steps contains a pipe or unset-variable hazard, so the explicit flags added nothing. Assisted-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
spec-drift/auto-regenbranch, requests review fromionq/developer-tools, and carries the spec diff in a collapsible sectionTest plan
ionq/developer-toolsis the correct team slug for review requestsworkflow_dispatchonce merged to verify the happy path (no drift → no PR; drift → PR opened)spec-driftlabel exists in the repo (needed for--label spec-driftto succeed)🤖 Generated with Claude Code