Skip to content

ci: Add PR risk workflow - #8277

Draft
sentry-junior[bot] wants to merge 1 commit into
masterfrom
ci/pr-risk-jev
Draft

sentry-junior[bot] wants to merge 1 commit into
masterfrom
ci/pr-risk-jev

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Why: this extends the PR risk experiment (already running in sentry-dotnet, junior, and toolkit) to sentry-python. Reviewers get an advisory risk: low|medium|high label on each non-draft PR, so we can compare the signal across backend SDKs.

How it works

  • Pins getsentry/pr-risk-action@1cdeab5 (current main, the Jev classifier).
  • The Jev action no longer applies labels, so a github-script step reads the JSON result and publishes the label. It skips publishing if the PR moved after classification, and it clears stale risk labels. The logic is the same as getsentry/toolkit's pr-risk-jev.yml.
  • pull_request_target gives fork PRs a write token for labels. No step checks out or runs PR code. edited triggers a re-run because the title and description go into the classifier.
  • The result JSON is uploaded as an artifact for 30 days.

Nothing here gates merges: the job is advisory and isn't a required check.

Open decision: the job needs an AI_GATEWAY_API_KEY Actions secret in this repo, and I couldn't check whether it's set. Without it, runs end unclassified and the advisory job fails.

#skip-changelog

via @dingsdax.

--

View Session [Sentry]

Co-Authored-By: Johannes Daxboeck <114897+dingsdax@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Results 📊

✅ 139266 passed | ⏭️ 7853 skipped | Total: 147119 | Pass Rate: 94.66% | Execution Time: 430m 26s

All tests are passing successfully.

✅ Patch coverage is 100.00% (no changed executable lines found; target 80%).
Project statement coverage is 90.21% (down 0.03 percentage points from base (c944c23) to head (da17a2c)).

Coverage diff
@@            Coverage Diff             @@
##        master     #8277       +/-##
==========================================
- Coverage    90.24%    90.21%    -0.03%
==========================================
  Files          203       203         —
  Tracked lines     27335     27335         —
  Branches     10246     10246         —
==========================================
- Hits         24667     24660        -7
- Misses        2668      2675        +7
  Partials      1559      1559         —

Generated by Coverage Action

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.

1 participant