Skip to content

ci(api): Add a reusable workflow that bumps @sentry/api in a consumer - #131317

Open
sentry-junior[bot] wants to merge 3 commits into
masterfrom
ci/api-consumer-bump-reusable
Open

sentry-junior[bot] wants to merge 3 commits into
masterfrom
ci/api-consumer-bump-reusable

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

sentry-docs and getsentry/toolkit each carry their own @sentry/api bump: sentry-docs has a shell script that merges a PR, and toolkit has a Node script that keeps one rolling PR. This adds bump-sentry-api-consumer.yml, a workflow_call workflow both can call from a thin bump-sentry-api.yml, so the logic lives here next to the package. It follows up on #131244.

  • The script is .github/workflows/scripts/bump-sentry-api.js, ported with its tests from toolkit's scripts/bump-sentry-api.mjs. It runs in the caller's checkout.
  • pin input:
    • dependency pins an exact package.json version with pnpm add --save-exact --lockfile-only, as sentry-docs does today.
    • catalog updates the pnpm-workspace.yaml catalog and its minimumReleaseAgeExclude entry, as toolkit does today.
  • mode input:
    • merge keeps sentry-docs' current behavior. It commits "Bump @sentry/api to X" on bot/bump-sentry-api-to-X, opens the PR with --fill (or reuses one a failed run left open), and merges it with --squash --admin.
    • rolling-pr keeps toolkit's current behavior. It keeps one bot/bump-sentry-api PR, rebuilds it from the default branch and force-pushes it with a lease. If someone else pushed a commit to it, it leaves the PR alone with a warning (merge commits don't count). It never merges.
  • Per-caller settings:
    • app-client-id and the app-private-key secret name the GitHub App that pushes and opens the PR. A PR opened with github.token doesn't start the caller's CI. In merge mode the app must also be allowed to --admin merge.
    • commit-author-name and commit-author-email set the commit author. They default to github-actions[bot], which toolkit uses today, and sentry-docs passes its own bot.
  • Callers use it @master. The workflow checks the script out from master too, so the two always match.

Merge order:

  1. This PR.
  2. The consumer PRs, in either order: ci(api): Bump @sentry/api through getsentry/sentry's reusable workflow sentry-docs#20835 and ci: Bump @sentry/api through getsentry/sentry's reusable workflow toolkit#2299. Each one calls this workflow from master.
  3. ci(api): Dispatch bump-sentry-api.yml in each @sentry/api consumer #131318, which switches the release dispatch to each repo's bump-sentry-api.yml.
  4. A follow-up in sentry-docs that deletes its temporary bump-api-schema-sha.yml alias.

via @BYK.

--

View Session [Sentry]

sentry-junior Bot and others added 2 commits November 16, 2026 18:38
sentry-docs and toolkit each carry their own @sentry/api bump: a shell
script that merges a PR in sentry-docs, and toolkit's rolling-PR script.
bump-sentry-api-consumer.yml runs one script for both, ported from
toolkit's, with a pin input (package.json dependency or pnpm catalog) and
a mode input (merge, or one rolling PR that never merges). The consumers
switch to it in their own PRs.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
The merge mode now commits as the caller's own bot and opens its PR with
--fill, as sentry-docs' script did. commit-author-name and
commit-author-email default to github-actions[bot], which toolkit's
rolling PR already uses.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0eec350. Configure here.

Callers already share a concurrency group, but the reusable job now
holds its own per-repository group so overlapping dispatches can't race
on the branch or the merge whatever the caller does.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant