Skip to content

Add auto-labeling/assigning functionality to repository workflows#777

Merged
forstmeier merged 10 commits intomasterfrom
add-pull-request-automations
Mar 4, 2026
Merged

Add auto-labeling/assigning functionality to repository workflows#777
forstmeier merged 10 commits intomasterfrom
add-pull-request-automations

Conversation

@forstmeier
Copy link
Copy Markdown
Collaborator

@forstmeier forstmeier commented Mar 2, 2026

Overview

Changes

  • add auto-labelling workflow
  • add auto-assigning workflow

Context

Trivial automations.

Summary by CodeRabbit

  • Chores
    • Implemented automated reviewer and assignee assignment for pull requests.
    • Added automatic labeling of pull requests based on changed file types (Markdown, Python, Rust, YAML).
    • Adjusted Dependabot schedules to run weekly (Mondays) for selected ecosystems.
    • Renamed workflow metadata from "Code checks" to "Run code checks" and added configuration files to support assignment and labeling.

Copilot AI review requested due to automatic review settings March 2, 2026 02:31
@github-project-automation github-project-automation Bot moved this to In Progress in Overview Mar 2, 2026
@github-actions github-actions Bot added the yaml YAML code updates label Mar 2, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 2, 2026

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
Workflows (new)
.github/workflows/assign_pull_request_reviewers.yaml, .github/workflows/label_pull_requests.yaml
Added workflows: one runs on PR opened to assign reviewers/assignees via kentaro-m/auto-assign-action@v2.0.1; the other runs on PR opened/synchronize/reopened to apply labels via actions/labeler@v5. Permissions set for repository contents read and pull-requests write.
Assignment config
.github/assignment_configuration.yaml
New assignment config enabling addReviewers, addAssignees set to author, and listing reviewers (forstmeier, chrisaddy).
Label config
.github/label_configuration.yaml
New labeler config mapping changed-file globs to language labels for Markdown, Python, Rust, and YAML.
Dependabot & CI metadata
.github/dependabot.yml, .github/workflows/run_code_checks.yaml
Dependabot schedule changed from daily to Mondays for specified ecosystems; workflow name/run-name changed from "Code checks" to "Run code checks" (no functional job 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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main changes: adding auto-labeling and auto-assigning workflows to the repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-pull-request-automations

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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@v5 and introduce .github/labeler.yml rules.
  • Add a PR reviewer auto-assignment workflow using johnmanjiro13/auto-reviewer-assign@v0.2.0 and introduce .github/auto-reviewer-assign.yml config.

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.

Comment thread .github/workflows/label_pull_requests.yaml
Comment thread .github/workflows/assign_pull_request_reviewers.yaml
Comment thread .github/workflows/assign_pull_request_reviewers.yaml
Comment thread .github/workflows/assign_pull_request_reviewers.yaml Outdated
Comment thread .github/workflows/label_pull_requests.yaml
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 2, 2026

Greptile Summary

This 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.

  • .github/workflows/label_pull_requests.yaml — runs actions/labeler@v5 on opened, synchronize, and reopened events with correctly scoped pull-requests: write permission
  • .github/label_configuration.yaml — maps markdown, python, rust, and yaml labels to appropriate glob patterns (including lock files and ecosystem config files)
  • .github/workflows/assign_pull_request_reviewers.yaml — runs kentaro-m/auto-assign-action@v2.0.1 only on opened, which is correct since reviewers should not be re-assigned on every push
  • .github/assignment_configuration.yaml — assigns both forstmeier and chrisaddy as reviewers and sets addAssignees: author; GitHub automatically excludes the PR author from the reviewer list, so self-review conflicts are handled natively
  • .github/dependabot.yml0 8 * * MON is valid standard cron syntax; the reduction to weekly cadence is reasonable for a mature project
  • .github/workflows/run_code_checks.yaml — cosmetic rename only, no functional change

Confidence Score: 5/5

  • This PR is safe to merge — all changes are additive CI/CD configuration with no impact on application code.
  • All six changed files are GitHub Actions workflow or configuration files. The logic is straightforward, permissions are minimal and correctly scoped, cron syntax is valid, and there are no modifications to application or infrastructure code.
  • No files require special attention

Last reviewed commit: da1a0e9

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

4 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

Comment thread .github/workflows/label_pull_requests.yaml
coderabbitai[bot]
coderabbitai Bot previously approved these changes Mar 2, 2026
@graphite-app graphite-app Bot requested a review from chrisaddy March 2, 2026 02:42
…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>
Copilot AI review requested due to automatic review settings March 2, 2026 02:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between c88d60b and 5d13f78.

📒 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

Comment thread .github/workflows/assign_pull_request_reviewers.yaml Outdated
Comment thread .github/workflows/label_pull_requests.yaml
coderabbitai[bot]
coderabbitai Bot previously approved these changes Mar 2, 2026
Comment thread .github/label_configuration.yaml
Comment thread .github/workflows/label_pull_requests.yaml
Comment thread .github/workflows/assign_pull_request_reviewers.yaml
Copilot AI review requested due to automatic review settings March 2, 2026 20:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread .github/label_configuration.yaml
Comment thread .github/assignment_configuration.yaml
coderabbitai[bot]
coderabbitai Bot previously approved these changes Mar 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread .github/workflows/assign_pull_request_reviewers.yaml
@forstmeier forstmeier merged commit 544070e into master Mar 4, 2026
8 checks passed
@forstmeier forstmeier deleted the add-pull-request-automations branch March 4, 2026 18:01
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Overview Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

yaml YAML code updates

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants