-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add genai-assisted label #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds automatic detection and labeling of GenAI-assisted pull requests to the existing validation action. The feature scans PRs for indicators of AI tool usage (like Claude, Copilot, ChatGPT, etc.) and applies a genai-assisted label when detected.
- Implements comprehensive pattern matching for 70+ AI coding tools and assistants
- Detects AI assistance through multiple signals: PR author, body, labels, commits, and comments
- Integrates detection into the existing PR validation workflow with graceful error handling
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/genaiPatterns.js | Defines exhaustive patterns for detecting AI tools, bots, commit signatures, and labels |
| lib/genaiDetection.js | Core detection logic that checks PRs across multiple dimensions (author, body, commits, comments) |
| lib/genaiDetection.test.js | Unit tests covering pattern matching for bots, labels, commits, PR bodies, and comments |
| lib/actions/pullRequest.js | Integrates GenAI detection into PR validation workflow with error handling |
| README.md | Documents the GenAI detection feature, triggers, supported tools, and customization options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this 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 7 out of 7 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this 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 7 out of 7 changed files in this pull request and generated 14 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Claude
Co-authored-by: Claude
Co-authored-by: Claude
Co-authored-by: Claude
Co-authored-by: Claude
Co-authored-by: Claude
Co-authored-by: Claude
Co-authored-by: Claude
ee21563 to
8b72856
Compare
Co-Authored-By: Claude
There was a problem hiding this 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 12 out of 14 changed files in this pull request and generated 7 comments.
Comments suppressed due to low confidence (2)
README.md:3
- This line appears to be a debug note that should be removed before merging. It doesn't provide value in the README and looks unprofessional.
[](https://github.com/mobsuccess-devops/github-actions-mobsuccess/actions/workflows/npm.yml)
README.md:1
- The company name "GitHub" should be capitalized correctly as "GitHub" not "Github".
# Github Mobsuccess action
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude
There was a problem hiding this 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 11 out of 13 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude
Co-Authored-By: Claude
What does it do? Why?
This feature automatically detects AI-assisted pull requests and applies the
genai-assistedlabel. The GitHub Action is the single source of truth for adding the label.Unified Hook System
Claude Code and Cursor use the same mechanism to signal AI assistance, with agent-specific markers:
Files involved
.githooks/prepare-commit-msgCo-Authored-Bybased on marker file.cursor/hooks.json.cursor-assistedwhen agent stops.claude/settings.json.claude-assistedwhen agent stops.cursor-assisted/.claude-assistedCo-Authored-By tags
.cursor-assistedCo-Authored-By: Cursor.claude-assistedCo-Authored-By: ClaudeWhy this approach?
Co-Authored-BysignatureCo-Authored-Byonly added when an agent actually workedDetection Flags Summary (GitHub Action)
copilot[bot],claude[bot],cursor[bot],codeium[bot],tabnine[bot],cody[bot],devin[bot],aider[bot]cursor/,claude/,ai/,copilot/,aider/,cody/,chatgpt/,genai/,windsurf/,devin/AI-assisted,generated with Claude,using Copilot,LLM-assistedai-assisted,copilot,claude,chatgpt,cursor,genai,llm-assistedCo-Authored-By: Claude,Co-Authored-By: Cursor,Generated with [Claude Code],[Copilot],[AI]I used Claude,Copilot generated this,AI wrote thisSee README.md for more information.
Co-authored-by: Claude