Add auto-labeling/assigning functionality to repository workflows#777
Add auto-labeling/assigning functionality to repository workflows#777forstmeier merged 10 commits intomasterfrom
Conversation
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughAdds GitHub Actions workflows and supporting config files to auto-assign reviewers/assignees and auto-label pull requests; updates Dependabot schedule and renames a workflow display name. No application source code or public API changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant PR as "Pull Request"
participant GH as "GitHub Actions"
participant Runner as "Workflow Runner"
participant AssignAction as "kentaro-m/auto-assign-action"
participant LabelerAction as "actions/labeler"
participant RepoConfig as "Repo (.github/*.yaml)"
PR->>GH: event (opened / synchronize / reopened)
GH->>Runner: start appropriate workflow job
Runner->>RepoConfig: read assignment/label configuration
alt assign flow (on opened)
Runner->>AssignAction: run assign step (token, config path)
AssignAction->>GH: call GitHub API to set reviewers/assignees
GH->>PR: update reviewers/assignees
end
alt label flow (on opened/sync/reopened)
Runner->>LabelerAction: run labeler step (token, config path)
LabelerAction->>RepoConfig: evaluate changed files against globs
LabelerAction->>GH: call GitHub API to apply labels
GH->>PR: update labels
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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. Comment |
There was a problem hiding this comment.
Pull request overview
Adds lightweight GitHub Actions automations to improve PR triage by automatically labeling PRs based on changed file patterns and automatically assigning PR reviewers.
Changes:
- Add a PR labeling workflow using
actions/labeler@v5and introduce.github/labeler.ymlrules. - Add a PR reviewer auto-assignment workflow using
johnmanjiro13/auto-reviewer-assign@v0.2.0and introduce.github/auto-reviewer-assign.ymlconfig.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/label_pull_requests.yaml | Runs labeler action on PR events to apply labels based on repo config. |
| .github/workflows/assign_pull_request_reviewers.yaml | Runs auto-assign action when a PR is opened to request reviewers. |
| .github/labeler.yml | Defines label rules for markdown/python/rust/yaml changes. |
| .github/auto-reviewer-assign.yml | Defines reviewer assignment configuration for the auto-assign action. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile SummaryThis PR adds two lightweight automation workflows (auto-labeling and auto-reviewer-assignment) for pull requests, provides their corresponding configuration files, shifts Dependabot update schedules from daily to weekly on Mondays, and renames the code-checks workflow display name.
Confidence Score: 5/5
Last reviewed commit: da1a0e9 |
…ow files - assign_pull_request_reviewers.yaml: add contents: read permission alongside the existing pull-requests: write, required for the actions/checkout@v4 step - label_pull_requests.yaml: add types: [opened, synchronize, reopened] to the pull_request trigger to prevent the workflow from re-triggering itself when it applies labels Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/assign_pull_request_reviewers.yaml:
- Around line 1-21: The workflow currently uses an unmaintained action
referenced as johnmanjiro13/auto-reviewer-assign@v0.2.0 in the "Assign pull
request reviewers" step; replace it with a maintained alternative (or an
official GitHub action) while preserving the token input (`token: ${{
secrets.GITHUB_TOKEN }}`) and required permissions (contents: read,
pull-requests: write), or alternatively perform a security review and add an
approval comment in the workflow to justify keeping this specific action; locate
the step that uses `johnmanjiro13/auto-reviewer-assign@v0.2.0` and update the
`uses:` value to the chosen maintained action (or document the security
assessment) so the workflow remains secure and supported.
In @.github/workflows/label_pull_requests.yaml:
- Around line 15-18: Remove the explicit repo-token input from the GitHub
Actions step that uses actions/labeler@v5: locate the step with name "Label pull
request" and the uses string "actions/labeler@v5" and delete the line providing
the `repo-token` key (repo-token: ${{ secrets.GITHUB_TOKEN }}), since the action
defaults to `${{ github.token }}` automatically; leaving the rest of the step
unchanged will simplify the workflow without altering behavior.
ℹ️ Review info
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
.github/auto-reviewer-assign.yml.github/labeler.yml.github/workflows/assign_pull_request_reviewers.yaml.github/workflows/label_pull_requests.yaml
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Overview
Changes
Context
Trivial automations.
Summary by CodeRabbit