feat: add support for pull request reviewer triggers - #12
Merged
Conversation
- Add support for pull request review_requested action in checkContainsTrigger function - Add support for pull request reviewer trigger in checkContainsTrigger function - Update pull request reviewer trigger to handle reviewer-list similarly to reference in body/comment - Add debug logging for requested reviewers in pull request trigger check - Additional improvements to pull request reviewer trigger functionality
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for triggering Claude actions when @claude is added as a reviewer to a pull request, treating reviewer assignment the same as text mentions. This provides a more automated workflow for protected branches and aligns with GitHub's Copilot reviewer pattern.
- Enhanced trigger detection to check if the trigger user is in the requested_reviewers list
- Added comprehensive test coverage for the new reviewer trigger functionality
- Updated documentation to clarify that assignee_trigger works for both issues and PRs
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/github/validation/trigger.ts | Added logic to check requested_reviewers array and treat matches as triggers |
| test/trigger-validation.test.ts | Added extensive test suite covering reviewer trigger scenarios including edge cases |
| README.md | Updated assignee_trigger documentation to mention PR assignment support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
markwylde
approved these changes
Oct 17, 2025
Owner
There was a problem hiding this comment.
Thanks @OlegZee. Released in https://github.com/markwylde/claude-code-gitea-action/releases/tag/v1.0.20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds minor feature:
This feature is similar to Github's Copilot reviewer.
Having this feature allows to add @claude to default reviewers for protected branch.
What Changed
Example Usage
Previously, you had to manually mention @claude in PR description:
Now you can simply add @claude as a reviewer via GitHub UI, and the action will trigger automatically.
Benefits