Skip to content

feat: add auto-labeling and issue templates#31

Merged
utkarsh232005 merged 2 commits into
KDM-cli:mainfrom
utkarsh232005:feat/auto-labeling-templates
May 16, 2026
Merged

feat: add auto-labeling and issue templates#31
utkarsh232005 merged 2 commits into
KDM-cli:mainfrom
utkarsh232005:feat/auto-labeling-templates

Conversation

@utkarsh232005
Copy link
Copy Markdown
Member

@utkarsh232005 utkarsh232005 commented May 16, 2026

Closes #3. Implements PR and issue auto-labeling configurations along with standardized issue templates.

Summary by CodeRabbit

  • Chores
    • Added automated labeling for newly opened issues to streamline triage.
    • Added automated labeling for pull requests (opened, updated, reopened) to improve PR organization and review routing.

Review Change Stack

Copilot AI review requested due to automatic review settings May 16, 2026 19:37
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6f9b5395-517c-49a0-9454-24e7939f4f6b

📥 Commits

Reviewing files that changed from the base of the PR and between 3f6fbcc and 8e30a61.

⛔ Files ignored due to path filters (2)
  • .github/issue-labeler.yml is excluded by none and included by none
  • .github/labeler.yml is excluded by none and included by none
📒 Files selected for processing (2)
  • .github/workflows/issue-labeler.yml
  • .github/workflows/labeler.yml

📝 Walkthrough

Walkthrough

Adds two GitHub Actions workflows: one labels newly opened issues via github/issue-labeler@v3 using .github/issue-labeler.yml; the other labels pull requests on pull_request_target using actions/labeler and rules in .github/labeler.yml.

Changes

Automated Issue and PR Labeling

Layer / File(s) Summary
Issue auto-labeling workflow
.github/workflows/issue-labeler.yml
Triggers on issue opened events with issues: write permission and runs github/issue-labeler@v3 using configuration at .github/issue-labeler.yml to apply labels to the new issue.
PR auto-labeling workflow
.github/workflows/labeler.yml
Triggers on pull_request_target for opened, synchronize, and reopened; grants contents: read and pull-requests: write; runs actions/labeler pinned to a commit and loads rules from .github/labeler.yml to label PRs based on modified files.

Sequence Diagram

sequenceDiagram
  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)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Two workflows danced into the night,
Tags aligned and labels bright,
Issues bowed and PRs took flight,
Automation hums—maintainers delight! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR implements the core labeling automation requirements from issue #3: both PR labeling workflow and issue labeling workflow. However, issue templates mentioned in the title are not reflected in the provided code changes. Clarify whether issue templates were added in this PR. The summary mentions only workflow files; confirm all requirements from issue #3 are implemented or document deferred work.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding auto-labeling workflows and issue templates, which matches the PR's primary objectives.
Out of Scope Changes check ✅ Passed Both workflow files directly address issue #3 requirements for PR and issue auto-labeling. No unrelated changes detected in the provided summary.
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.

📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #3

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between e02845d and 3f6fbcc.

⛔ Files ignored due to path filters (5)
  • .github/ISSUE_TEMPLATE/bug_report.yml is excluded by none and included by none
  • .github/ISSUE_TEMPLATE/config.yml is excluded by none and included by none
  • .github/ISSUE_TEMPLATE/feature_request.yml is excluded by none and included by none
  • .github/issue-labeler.yml is excluded by none and included by none
  • .github/labeler.yml is excluded by none and included by none
📒 Files selected for processing (2)
  • .github/workflows/issue-labeler.yml
  • .github/workflows/labeler.yml

Comment thread .github/workflows/issue-labeler.yml Outdated
Comment thread .github/workflows/issue-labeler.yml
Comment thread .github/workflows/issue-labeler.yml Outdated
Comment thread .github/workflows/issue-labeler.yml Outdated
Comment thread .github/workflows/labeler.yml
Comment thread .github/workflows/labeler.yml Outdated
Comment thread .github/workflows/labeler.yml
@utkarsh232005 utkarsh232005 merged commit da575ab into KDM-cli:main May 16, 2026
2 checks passed
@utkarsh232005 utkarsh232005 deleted the feat/auto-labeling-templates branch May 17, 2026 18:05
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.

Add Auto-Labeling GitHub Actions Configuration

2 participants