-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add "take" comment command #5932
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
Conversation
WalkthroughA new GitHub Actions workflow named "Comment Commands" has been added. It listens for new comments on issues and, if the comment body is exactly "take", automatically assigns the commenter to the issue using the GitHub CLI. The workflow ensures only one assignment per user at a time. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHub
participant Workflow
User->>GitHub: Comment "take" on issue
GitHub->>Workflow: Trigger workflow on issue_comment.created
Workflow->>GitHub: Assign issue to commenter via gh CLI
GitHub-->>User: Issue assigned to commenter
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/workflows/comment-commands.yml (2)
15-17
: Remove trailing whitespace to satisfy YAML linters
Line 16 has superfluous spaces afterwrite
, flagged by yamllint.- issues: write + issues: write
12-14
: Explicitly setcancel-in-progress
in concurrency block
Without it, multiple “take” comments from the same user queue up instead of replacing the previous run. If you intend to keep only the latest, add:concurrency: group: ${{ github.actor }}-issue-assign cancel-in-progress: true
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/comment-commands.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/comment-commands.yml
[error] 16-16: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: Run snippets and cpython tests (windows-latest)
- GitHub Check: Run snippets and cpython tests on wasm-wasi
- GitHub Check: Check the WASM package and demo
- GitHub Check: Run tests under miri
- GitHub Check: Run rust tests (windows-latest)
- GitHub Check: Run rust tests (macos-latest)
- GitHub Check: Run snippets and cpython tests (ubuntu-latest)
- GitHub Check: Run snippets and cpython tests (macos-latest)
- GitHub Check: Check Rust code with rustfmt and clippy
- GitHub Check: Run rust tests (ubuntu-latest)
- GitHub Check: Ensure compilation on various targets
🔇 Additional comments (1)
.github/workflows/comment-commands.yml (1)
9-9
: Make the body check more robust (trim / case-insensitive)
The matchgithub.event.comment.body == 'take'
fails if the user types “Take”, “take \n”, etc.
Consider normalising the string:- if: (!github.event.issue.pull_request) && github.event.comment.body == 'take' + if: | + (!github.event.issue.pull_request) && + contains(toJson(github.event.comment.body), '"take"')(or use
startsWith()
/contains()
as preferred).
ok, PR is excluded 😅 |
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.
Thank you!
PRs are excluded, and this will only work after merging to main:) |
closes #5926
Summary by CodeRabbit