Skip to content

ci: Add PR classifiers workflow - #1431

Open
sentry-junior[bot] wants to merge 4 commits into
masterfrom
ci/pr-classifiers-workflow
Open

sentry-junior[bot] wants to merge 4 commits into
masterfrom
ci/pr-classifiers-workflow

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Description

Adds .github/workflows/pr-classifiers.yml, which runs the shared getsentry/github-workflows/pr-classifiers action (getsentry/github-workflows#188), the same workflow as the other backend SDK repositories. It gives every pull request an advisory risk label (risk: low, risk: medium or risk: high) and keeps one summary comment that explains the label. The label is only a hint. It approves nothing and should not become a required check.

The action gets a short-lived GitHub App token that can only read the internal getsentry/classifiers repository, checks it out at a pinned commit and runs the classifier from there. It never checks out or runs code from the pull request. The action is pinned to a full commit SHA.

Merge order: merge #1428 (the fact sheet at .github/classifiers.toml) first. The classifier reads the fact sheet from the pull request's base branch and skips repositories without one.

Before merging, this repository needs the CLASSIFIERS_APP_CLIENT_ID Actions variable, the CLASSIFIERS_APP_KEY and AI_GATEWAY_API_KEY Actions secrets, and the classifiers GitHub App's access to getsentry/classifiers. Without them, every PR shows a failing (non-required) "PR classifiers" check.

The workflow runs on pull_request_target, so it does not run with this change on this PR and takes effect after merge. To undo it, revert this PR.

#skip-changelog

via @dingsdax.

--

View Session [Sentry]

Co-Authored-By: johdax <114897+dingsdax@users.noreply.github.com>
Co-Authored-By: johdax <114897+dingsdax@users.noreply.github.com>
@sentry-junior
sentry-junior Bot marked this pull request as ready for review November 25, 2026 12:06
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner November 25, 2026 12:06
@sentry-junior
sentry-junior Bot requested a review from dingsdax November 25, 2026 12:06

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

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 24adcf7. Configure here.

Comment thread .github/workflows/pr-classifiers.yml Resolved
Comment thread .github/workflows/pr-classifiers.yml Resolved
jobs:
classify:
name: PR classifiers
runs-on: ubuntu-24.04

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04

Junior pls double check that the other runners in this repo are on newer ubuntu before applying

pull-requests: write # this job only; needed to publish the risk label and the summary comment
steps:
# This job must never check out or run code from the pull request.
- uses: getsentry/github-workflows/pr-classifiers@edc87d6f133ac6204e22dee5123167a5eff3ed79 # main, https://github.com/getsentry/github-workflows/commit/edc87d6f133ac6204e22dee5123167a5eff3ed79

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Double check we have latest

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants