feat: add auto-labeling and issue templates#31
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds two GitHub Actions workflows: one labels newly opened issues via ChangesAutomated Issue and PR Labeling
Sequence DiagramsequenceDiagram
participant User as Contributor
participant GitHub as GitHub(Repository)
participant Actions as Actions(Runner)
participant IssueLabeler as Issue-LabelerAction
participant Labeler as Actions-Labeler
User->>GitHub: open issue
GitHub->>Actions: issue opened event
Actions->>IssueLabeler: run with `.github/issue-labeler.yml`
IssueLabeler->>GitHub: apply issue labels (issues: write)
User->>GitHub: open/update PR
GitHub->>Actions: pull_request_target event
Actions->>Labeler: run with `.github/labeler.yml`
Labeler->>GitHub: read changed files (contents: read) & apply PR labels (pull-requests: write)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/issue-labeler.yml:
- Line 17: The workflow references a missing configuration file via the
"configuration-path" entry pointing to ".github/issue-labeler.yml"; add that
file to the PR containing the label-to-keyword mappings (e.g., rule "bug" ->
["bug","error","broken","fix"] and "enhancement" ->
["feature","request","add","new"]) so the issue-labeler workflow can run; create
.github/issue-labeler.yml with the keyword lists and any other label rules
required by issue `#3`.
- Around line 19-28: Remove the separate github-script step named 'Apply "needs
triage" label' that calls actions/github-script@v7 and instead add a catch-all
rule for the "needs triage" label in the issue-labeler configuration
(.github/issue-labeler.yml) by mapping the label to a wildcard pattern (e.g.,
needs triage: - '*') so all new issues receive that label; once added, delete
the github.rest.issues.addLabels call and its step from the workflow to avoid
duplicate labeling.
- Line 20: The workflow currently references the mutable tag
"actions/github-script@v7"; replace that with the specific commit SHA for the
v7.1.0 release to pin the action (i.e., change the uses entry
"actions/github-script@v7" to "actions/github-script@<commit-sha-for-v7.1.0>")
so the workflow uses an immutable reference and mitigates supply-chain risk.
- Line 14: Replace the floating action reference "github/issue-labeler@v3" in
the workflow so it is pinned to a specific release or commit for supply-chain
security; update the uses entry to "github/issue-labeler@v3.4" (or, for maximum
immutability, pin to the exact commit SHA of v3.4) to ensure the action cannot
be silently reassigned.
In @.github/workflows/labeler.yml:
- Line 17: Create the missing .github/labeler.yml file referenced by the
workflow (configuration-path: ".github/labeler.yml") and add the file-to-label
mapping rules from issue `#3`: define top-level labels documentation, frontend,
and ci/cd with the specified changed-files globs mapping docs/***, **/*.md for
documentation; src/***, public/*** for frontend; and .github/workflows/*** for
ci/cd; then validate the YAML syntax and structure against actions/labeler v5
documentation to ensure it uses the correct v5 configuration format.
- Line 14: Replace the mutable tag "actions/labeler@v5" with the action pinned
to a specific commit SHA: find the workflow line using actions/labeler@v5 and
change it to actions/labeler@<commit-sha> (use the commit hash for the v5.0.0
release) so the GitHub Action is immutable and supply-chain safe.
- Around line 3-4: The workflow uses actions/labeler pinned to the v5 tag;
replace that tag with a specific commit SHA (pin actions/labeler to a known-good
commit) wherever actions/labeler is referenced so the workflow uses an exact
commit ID instead of `v5`, and add an inline security comment near the
`pull_request_target` trigger explaining why this workflow is considered safe
(no checkout, API-only labeler, minimal permissions) for future maintainers.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 01624ab8-07cd-4bed-9c2b-87fff870aca6
⛔ Files ignored due to path filters (5)
.github/ISSUE_TEMPLATE/bug_report.ymlis excluded by none and included by none.github/ISSUE_TEMPLATE/config.ymlis excluded by none and included by none.github/ISSUE_TEMPLATE/feature_request.ymlis excluded by none and included by none.github/issue-labeler.ymlis excluded by none and included by none.github/labeler.ymlis excluded by none and included by none
📒 Files selected for processing (2)
.github/workflows/issue-labeler.yml.github/workflows/labeler.yml
Closes #3. Implements PR and issue auto-labeling configurations along with standardized issue templates.
Summary by CodeRabbit