Skip to content

feat: parallel SDK generation support#1929

Merged
danielkov merged 3 commits intomainfrom
feat/ci-create-or-update-pr
Feb 27, 2026
Merged

feat: parallel SDK generation support#1929
danielkov merged 3 commits intomainfrom
feat/ci-create-or-update-pr

Conversation

@danielkov
Copy link
Contributor

@danielkov danielkov commented Feb 27, 2026

Summary

  • Add ci create-or-update-pr command that reads a directory of per-target report JSON files, merges version reports, and creates/updates a GitHub PR
  • ci generate now writes a per-target generation report to .speakeasy/reports/<target>.json after finalize, so the file survives git operations
  • Use stable branch names (no timestamp) so subsequent runs reuse the same branch and PR instead of creating new ones each time
  • FindExistingPR matches by head branch prefix instead of PR title prefix, making it resilient to title edits
  • Skip MergeBranch in direct mode when INPUT_BRANCH_NAME is set (matrix mode), preventing generated code from leaking back to the source branch
  • Fix prdescription.sanitizeBranchName to match environment.SanitizeBranchName

✻ Clauded...

danielkov and others added 3 commits February 27, 2026 19:29
Add support for parallel SDK generation workflows where each target
generates independently and a finalize step accumulates reports and
creates a single PR.

- New `TargetGenerationReport` struct captures CI-agnostic per-target
  generation data (version report, URLs, metadata)
- `ci generate` now writes per-target report to .speakeasy/reports/
  when INPUT_TARGET is set (matrix mode)
- New `ci create-or-update-pr` command reads accumulated reports JSON,
  merges version reports, generates PR description, and creates/updates
  the GitHub PR
- Export `SetPRLabels` and add `GetClient` accessor on Git

✻ Clauded...
Allows testing the report accumulation and PR description generation
locally without requiring GitHub API access.

✻ Clauded...
The create-or-update-pr command now takes a directory of per-target JSON
files instead of a single accumulated file. This simplifies the CI
accumulation step to just file-level overwrites with no jq merging.
Also skips unparseable files gracefully instead of failing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@danielkov danielkov merged commit a7bb5dc into main Feb 27, 2026
4 checks passed
@danielkov danielkov deleted the feat/ci-create-or-update-pr branch February 27, 2026 21:49
@danielkov danielkov changed the title feat: add ci create-or-update-pr command for parallel SDK generation feat: parallel SDK generation support Feb 27, 2026
danielkov added a commit that referenced this pull request Feb 27, 2026
…ix mode (#1930)

## Summary

Follow-up fixes for parallel SDK generation support (#1929):

- **Write generation report after finalize** — report files were being
wiped by git operations (rebase/checkout) during `finalize()`. Moved
`writeGenerationReport()` to run after `finalize()` so the file survives
to be uploaded as an artifact.

- **Use stable branch names** — removed timestamp suffix from regen
branch names (`speakeasy-sdk-regen` instead of
`speakeasy-sdk-regen-{timestamp}`). This lets subsequent runs reuse the
same branch and PR instead of creating new ones each time.

- **Find existing PRs by head branch** — changed `FindExistingPR` from
brittle title-prefix matching to matching by head branch prefix. Editing
a PR title no longer breaks PR reuse.

- **Skip MergeBranch in matrix mode** — when `INPUT_BRANCH_NAME` is set
(matrix/parallel mode), `finalize()` no longer merges the regen branch
back into the source branch. This prevented generated code from leaking
onto the source branch.

✻ Clauded...

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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