feat: auto-assign SDK team reviewers on skill-drift PRs#92
Conversation
Extend the weekly skill-drift-check workflow to directly fix straightforward drift by opening PRs instead of only creating issues. The agent now: - Prefers opening PRs for mechanical changes (new config options, version bumps, new integration entries) with the fix applied inline - Falls back to issues for complex/risky drift (breaking API removals, ambiguous behavior, coordinated rewrites) - Uses add_reviewer to assign the appropriate SDK team (from the mapping table) as reviewer on each PR - PRs are opened as ready-for-review (not draft) with auto-labels and 14-day expiry Frontmatter changes: - Added create-pull-request safe output (max 10, non-draft, protected supply-chain files fall back to issues) - Added add-reviewer safe output restricted to the 5 SDK team slugs - Recompiled lock.yml with gh-aw v0.64.2 (was v0.55.0) Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Add a lightweight workflow that triggers on PR open for skill-drift labeled PRs. It checks which skills/sentry-*-sdk/ directories were modified and requests review from the corresponding SDK team via a hardcoded mapping. This removes the dependency on the agentic workflow remembering to call add_reviewer — team assignment happens deterministically based on file paths regardless of how the PR was created. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
The requestReviewers API needs the full org/team-slug format (e.g., getsentry/team-javascript-sdks) to resolve teams correctly. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 01ca68b. Configure here.
| 'sentry-react-sdk': 'getsentry/team-javascript-sdks', | ||
| 'sentry-ruby-sdk': 'getsentry/team-web-sdk-backend', | ||
| 'sentry-svelte-sdk': 'getsentry/team-javascript-sdks', | ||
| }; |
There was a problem hiding this comment.
Team reviewer slugs include invalid org prefix
High Severity
The SKILL_TEAMS mapping values include the getsentry/ organization prefix (e.g., getsentry/team-mobile), but the GitHub REST API's pulls.requestReviewers endpoint expects team_reviewers to be an array of bare team slugs without the org prefix (e.g., team-mobile). Passing org-prefixed values will cause the API call to fail, meaning reviewers will never be assigned — defeating the entire purpose of this workflow.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 01ca68b. Configure here.
| pull-requests: write | ||
| steps: | ||
| - name: Assign SDK team reviewers | ||
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 |
There was a problem hiding this comment.
Inconsistent action version not in lock file
Low Severity
The new workflow pins actions/github-script to SHA 60a0d83039c74a4aee543508d2ffcb1c3799cdea (v7.0.1), while every other workflow in the repository uses v8 (ed597411d8f924073f98dfc5c65a23a2325f34cd). The v7 SHA is also absent from actions-lock.json, breaking the repository's action-pinning convention.
Reviewed by Cursor Bugbot for commit 01ca68b. Configure here.
|
|
||
| jobs: | ||
| assign-reviewers: | ||
| if: contains(github.event.pull_request.labels.*.name, 'skill-drift') |
There was a problem hiding this comment.
Label check on opened event will never match
High Severity
The workflow only triggers on pull_request: opened, but the job's if condition checks for the skill-drift label. The GitHub REST API for creating pull requests doesn't support a labels parameter — labels are added in a separate API call after creation. The opened webhook event payload reflects PR state at creation time, before labels are attached. This means github.event.pull_request.labels will always be empty, the contains(...) check will always be false, and the job will never run. Adding labeled to the types list would allow the workflow to also trigger when the label is applied.
Reviewed by Cursor Bugbot for commit 01ca68b. Configure here.


Summary
Adds a lightweight workflow that auto-assigns SDK team reviewers when a skill-drift PR is opened — no agent involvement needed.
Problem
PR #84 was opened by the drift workflow but had no team reviewers assigned. The agentic workflow has
add_revieweravailable but the agent didn't call it. Relying on an LLM to remember a tool call is unreliable.Solution
A simple
pull_request: openedworkflow with a hardcoded skill → team mapping:sentry-android-sdk,sentry-cocoa-sdkteam-mobilesentry-browser-sdk,sentry-node-sdk,sentry-nextjs-sdk,sentry-nestjs-sdk,sentry-react-sdk,sentry-svelte-sdk,sentry-cloudflare-sdkteam-javascript-sdkssentry-dotnet-sdk,sentry-go-sdk,sentry-php-sdk,sentry-ruby-sdk,sentry-elixir-sdkteam-web-sdk-backendsentry-flutter-sdk,sentry-react-native-sdkteam-mobile-cross-platformsentry-python-sdkowners-python-sdkTriggers only when:
skills/sentry-*-sdk/**filesskill-driftlabelAlso retroactively assigned JS SDK reviewers to PR #84.