Skip to content

Add GitHub Action to label dependabot and copilot PRs#2185

Open
vibhansa-msft wants to merge 7 commits intomainfrom
feature/dependabot-copilot-label
Open

Add GitHub Action to label dependabot and copilot PRs#2185
vibhansa-msft wants to merge 7 commits intomainfrom
feature/dependabot-copilot-label

Conversation

@vibhansa-msft
Copy link
Copy Markdown
Member

Summary

Adds a new GitHub Actions workflow that automatically adds the copilot label to PRs when:

  1. PR author is dependabot (dependabot[bot] or dependabot)
  2. >50% of commits contain Copilot co-author trailers (e.g. Co-authored-by: Copilot, [copilot], generated-by: copilot)

Files

  • .github/workflows/dependabot-label.yml — new workflow

Notes

  • Runs on pull_request: opened events
  • Uses actions/github-script@v7
  • Permissions scoped to pull-requests: write

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 a GitHub Actions workflow to automatically apply a copilot label to newly opened PRs based on author (Dependabot) or commit-message heuristics indicating Copilot involvement.

Changes:

  • Introduces .github/workflows/dependabot-label.yml to label PRs on pull_request: opened.
  • Uses actions/github-script@v7 to (1) detect Dependabot PRs and (2) label PRs where >50% of commits match Copilot-related trailers/tags.

vibhansa-msft and others added 2 commits March 25, 2026 10:56
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

@vibhansa-msft I've opened a new pull request, #2186, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vibhansa-msft vibhansa-msft modified the milestones: v2-2.5.3, v2-2.5.4 Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants