Skip to content

ci(risk): Move the PR risk check to the classifiers action - #6677

Merged
stephanie-anderson merged 2 commits into
mainfrom
ci/pr-classifiers
Nov 19, 2026
Merged

stephanie-anderson merged 2 commits into
mainfrom
ci/pr-classifiers

Conversation

@stephanie-anderson

Copy link
Copy Markdown
Contributor

📜 Description

Replaces .github/workflows/pr-risk-jev.yml with .github/workflows/pr-classifiers.yml.

The risk classifier moved from getsentry/sdk-pr-risk-action to the internal getsentry/classifiers repository. A public repository cannot call an action in an internal one with a plain uses: line, so the workflow now:

  1. gets a short-lived app token that can only read the contents of getsentry/classifiers,
  2. checks that repository out at a pinned commit into .classifiers,
  3. runs the action from that checkout.

How a pull request is classified is unchanged: the same rubric, the same sentry-java fact sheet and the same rules as before. The request sent to the model was compared between the old and the new repository for 20 open pull requests, five of them from sentry-java, and is byte-identical.

What changes for this repo:

  • A summary comment. The action keeps one comment per pull request with the risk label and its reasons, and rewrites it on each run. When a rule raised a low, it lists the rules and the files that triggered them. When the model itself chose medium or high, it names the main concerns.
  • Title and description edits no longer re-score. They cannot change the result, because neither is sent to the model. Such a run now ends green without touching the label. Base branch changes still re-score.
  • The check and artifact are renamed to "PR classifiers" and pr-classifiers-<number>.
  • The uploaded result is smaller. It carries the status, the label, the rules that fired and the scored commits.

💡 Motivation and Context

The classifier is being set up to hold more than the risk check and to serve more repositories, and it moved to its own repository for that. getsentry/sdk-pr-risk-action will be archived once its callers have moved; this is the first one.

💚 How did you test it?

The action has unit tests and runs in the classifiers repository's own CI. Not yet run anywhere: this caller shape (app token, checkout, action run from the checkout), the summary comment against the live API, and the skip for title edits. This repository is the first to use them.

Because the workflow uses pull_request_target, it does not run on this pull request. It takes effect after merge. After merging I will check on a test pull request that:

  • a push scores the commit, sets the label and writes the comment,
  • a title edit on a labelled pull request ends as edit_ignored and leaves the label,
  • a base branch change re-scores,
  • a pull request from a fork behaves the same.

If the first run fails in the token or checkout step, every pull request shows a red "PR classifiers" check until it is fixed. It is not a required check, and reverting this pull request restores the previous workflow.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.

#skip-changelog

🤖 Generated with Claude Code

The risk classifier moved from getsentry/sdk-pr-risk-action to the
internal getsentry/classifiers repository. A public repository cannot
call an action in an internal one directly, so the workflow now gets a
short-lived, read-only app token, checks the classifiers out at a
pinned commit and runs the action from that checkout.

Classification is unchanged. Two things are new: the action skips runs
started by a title or description edit when the PR already has a risk
label, and it keeps one summary comment on the PR with the label and
its reasons.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@stephanie-anderson
stephanie-anderson requested review from a team and adinauer as code owners November 19, 2026 08:13
@stephanie-anderson
stephanie-anderson requested review from markushi and runningcode and removed request for a team November 19, 2026 08:13
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 19, 2026
@sentry

sentry Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.65.0 (1) release

⚙️ sentry-android Build Distribution Settings

The token action deprecates app-id in favour of client-id.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 19, 2026

@runningcode runningcode 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.

LGTM! Let's try it out

@stephanie-anderson
stephanie-anderson merged commit 639b370 into main Nov 19, 2026
47 checks passed
@stephanie-anderson
stephanie-anderson deleted the ci/pr-classifiers branch November 19, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants