Skip to content

ci: open the release pull request as the app so it gets CI - #2403

Open
alexander-akait wants to merge 2 commits into
mainfrom
ci/release-pr-triggers-workflows
Open

ci: open the release pull request as the app so it gets CI#2403
alexander-akait wants to merge 2 commits into
mainfrom
ci/release-pr-triggers-workflows

Conversation

@alexander-akait

@alexander-akait alexander-akait commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

A pull request opened with the repository's own GITHUB_TOKEN does not trigger workflows. That is why #2393 has only the two Socket checks on it and no Lint, Test or Client job at all — the version bump and changelog reach main without the suite ever running on them, and with no checks reported the pull request cannot be merged.

The repository already generates an app token for the dependabot auto-merge workflow. The release job now does the same and hands it to changesets/action, which in v2 takes a custom token through the github-token input rather than the environment variable. GITHUB_TOKEN stays set in env because changeset version runs the changelog generator, which queries the GitHub API for commit and pull request info.

Effect on #2393: the next release-workflow run updates that pull request as the app, which triggers the workflows on it. Same secrets as dependabot.yml (BOT_APP_ID / BOT_PRIVATE_KEY), so nothing new needs configuring.

What kind of change does this PR introduce?

ci

Did you add tests for your changes?

No — workflow change; verified by parsing the workflow and checking github-token against the pinned action's own action.yml.

Does this PR introduce a breaking change?

No.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

n/a

Use of AI

AI was used. Claude Code diagnosed why the release pull request had no checks, wrote the workflow change, and drafted this description.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KUpsHWHZG2FxHzJxRUvVv3


Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Updated release automation to use dedicated application authentication when publishing changesets and retrieving changelog information.
    • Release workflows now use configured application credentials instead of the default repository token.
    • Restricted release automation permissions to the access required for publishing updates and managing pull requests, improving control over automated release activities.

@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9023411

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.91%. Comparing base (e58a70b) to head (9023411).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2403      +/-   ##
==========================================
- Coverage   96.97%   96.91%   -0.07%     
==========================================
  Files          12       12              
  Lines        1653     1653              
==========================================
- Hits         1603     1602       -1     
- Misses         50       51       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

A pull request opened with the repository's own GITHUB_TOKEN does not
trigger workflows, so the release pull request never ran lint, the test
matrix or the client job -- #2393 has only the two Socket checks on it,
and with no checks reported it cannot be merged.

The repository already generates an app token for the dependabot
auto-merge workflow; the release job now does the same and hands it to
changesets/action. v2 takes a custom token through the github-token
input rather than the environment variable, which stays set because
changeset version runs the changelog generator against the GitHub API.
@alexander-akait
alexander-akait force-pushed the ci/release-pr-triggers-workflows branch from 90781a7 to 856c4f2 Compare September 2, 2026 19:17
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 52430bae-6a5e-48c0-85df-8d5f36fe2745

📥 Commits

Reviewing files that changed from the base of the PR and between 90781a7 and 9023411.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


Walkthrough

The release workflow now generates a GitHub App token from BOT_APP_ID and BOT_PRIVATE_KEY, with write permissions for contents and pull requests. Changesets uses this token for action authentication and changelog GitHub API queries through the GITHUB_TOKEN environment variable.

Merge Risk: ⚪ Minimal · up to 90234

This localized workflow change updates release pull requests to use the repository app token so required CI workflows can run; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main workflow change: opening the release pull request with the GitHub App token so CI runs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/release-pr-triggers-workflows

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: c09d2fb8-3eb8-42c7-a032-918093a29bfe

📥 Commits

Reviewing files that changed from the base of the PR and between 17e689e and 90781a7.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Comment thread .github/workflows/release.yml
create-github-app-token mints a token carrying every permission the app
is installed with. changesets/action documents needing contents: write
to commit the version change and pull-requests: write to open the pull
request, so the token now requests those two and nothing else. They match
the job's own permissions block; id-token comes from the workflow for
trusted publishing and is not a token permission.

Copy link
Copy Markdown
Member Author

codecov/project is red here (-0.07%, one fewer hit) and it is not this pull request's.

The diff is a single file, .github/workflows/release.yml, with no source or test lines at all — codecov agrees, reporting "All modified and coverable lines are covered by tests" and Lines 1653 → 1653 with Hits -1. A change that touches no source cannot move a hit count.

It has now happened on two heads of this branch, so I looked for a nondeterministic line rather than assuming a blip. Both suites are deterministic here:

  • the browser suite run twice, coverage maps compared statement by statement — identical
  • the node suite run twice, same comparison over src — identical

So the varying hit is not in the tests. CI merges 13 uploads for a head (12 Test jobs plus Client), and a line covered by one job and not another is only covered in the union — so a single upload arriving late or missing shifts the total by exactly this much. That is a property of the report, not of the change.

No commit for it, since there is nothing in this diff to fix. Flagging it rather than leaving a red check unexplained: if it persists on unrelated pull requests, the upload composition is worth looking at on its own.


Generated by Claude Code

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.

1 participant