Repository navigation
ci: add s2-specs sync workflow and make update_specs portable - #164
Conversation
Confidence Score: 4/5
[Medium impact] The changes reach this SDK’s specs-sync automation and generated code. The PR needs an App token for specs update PRs before merging. Findings
Fix with agent prompt### Issue 1
.github/workflows/sync_specs.yaml:55-56
Without a `token` override, `create-pull-request` uses `GITHUB_TOKEN`. PRs and branch updates made with that token do not trigger the repository’s `pull_request` workflows. Since `ci.yml` only runs on those events, generated changes receive no unit tests or integration checks. If those checks are required, the PR stays blocked.
Pass an App token, as the [Go sync workflow](https://github.com/s2-streamstore/s2-sdk-go/blob/HEAD/.github/workflows/sync_specs.yaml#L21-L32) does. This repository already creates one in `release-please.yml`.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds automatic
Reviews (1) · Last reviewed commit: "ci: add s2-specs sync workflow and make ..." · Reviewed by Greptile |
| uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 | ||
| with: |
There was a problem hiding this comment.
Without a token override, create-pull-request uses GITHUB_TOKEN. PRs and branch updates made with that token do not trigger the repository’s pull_request workflows. Since ci.yml only runs on those events, generated changes receive no unit tests or integration checks. If those checks are required, the PR stays blocked.
Pass an App token, as the Go sync workflow does. This repository already creates one in release-please.yml.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/sync_specs.yaml
Line: 55-56
Comment:
**Specs PRs skip CI**
Without a `token` override, `create-pull-request` uses `GITHUB_TOKEN`. PRs and branch updates made with that token do not trigger the repository’s `pull_request` workflows. Since `ci.yml` only runs on those events, generated changes receive no unit tests or integration checks. If those checks are required, the PR stays blocked.
Pass an App token, as the [Go sync workflow](https://github.com/s2-streamstore/s2-sdk-go/blob/HEAD/.github/workflows/sync_specs.yaml#L21-L32) does. This repository already creates one in `release-please.yml`.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Add `"sdk/**"` to the `push` path filter in `.github/workflows/dispatch.yaml` so pushes to `main` that modify `sdk/` (such as `sdk/spec.md`, `sdk/rationale.md`, and `sdk/vectors/**`) also dispatch `s2-specs-update` to downstream repositories. Previously `paths: ["s2/**"]` predated `sdk/`, causing `sdk/**`-only commits to skip downstream dispatch and leaving downstream submodules and open sync PRs behind `main`. Companion downstream PRs: - s2-streamstore/docs#406 - s2-streamstore/s2#963 - s2-streamstore/s2-sdk-typescript#449 - s2-streamstore/s2-sdk-go#524 - s2-streamstore/s2-sdk-python#164
Adds
.github/workflows/sync_specs.yamlto handles2-specs-updatedispatches froms2-streamstore/s2-specs(which already dispatches to this repo) using the same single-PR pattern as the other SDKs:specs/update-s2-specs) withdelete-branch: trueand a workflow-level concurrency group (cancel-in-progress: false).repository_dispatch(s2-specs-update),workflow_dispatch, andpushtomaintouchings2-specs(so stale sync PRs auto-close ifmaincatches up via another PR).ref: mainonactions/checkoutandbase: mainonpeter-evans/create-pull-request.sed -i ''inupdate_specswith portable Python so the script runs cleanly onubuntu-latestas well as macOS.Related: s2-streamstore/s2-specs#66