feat: add issue comment command bot for assignment, labels and state management#101
feat: add issue comment command bot for assignment, labels and state management#101khushiiagrawal wants to merge 2 commits intokrkn-chaos:mainfrom
Conversation
Signed-off-by: khushiiagrawal <khushisaritaagrawal@gmail.com>
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||||
Signed-off-by: khushiiagrawal <khushisaritaagrawal@gmail.com>
rh-rahulshetty
left a comment
There was a problem hiding this comment.
IMHO we should probably adopt something that already exists from the Github Marketplace like: https://github.com/marketplace/actions/custom-slash-commands
This Github action uses YAML config, which will make configuration much easier.
We will need something common across all Krkn repositories.
@chaitanyaenr @paigerube14 @tsebastiani looping in to get your feedback if there is any existing tool that we are using for managing slash commands.
|
@rh-rahulshetty we don't currently have any existing tooling that is able to label or assign issues/pr's. Think it is definitely needed. I think a more reusable marketplace action would be better so we don't need to reconfigure each repo each time we want a change |
|
@paigerube14 @rh-rahulshetty @chaitanyaenr @tsebastiani Hey!
Why bots work better: Bots like Prow run as GitHub Apps with elevated permissions, allowing them to handle assignments more reliably for external contributors. This is why projects with lots of community contributions prefer bot infrastructure over GitHub Actions. |
|
@AR21SM thanks for your suggestion. im aware that bots/apps handle permissions much better (specifically bypassing the assignee restrictions that affect GitHub Actions), but adding a bot requires org level installation and infrastructure that I cannot configure myself. @rh-rahulshetty @paigerube14 , to address the reusability concern: i agree we shouldn't duplicate this workflow. i can convert this into a Reusable Workflow located in a central repository (e.g - krkn-chaos/.github), or we can adopt a Marketplace action as suggested. if we want to solve the permission issues AR21SM mentioned without spinning up Prow, we would need to run the Action using an Admin PAT instead of the default GITHUB_TOKEN. |
@khushiiagrawal using an Admin PAT wouldn't solve the external contributor assignment issue. The limitation is at the GitHub API level: only users with push access (collaborator)or org members can be assigned to the native assignee field, regardless of what token is used. |
|
I think this might be better suited for maintainers to handle directly. Just a thought! 🙂 |
User description
Summary
Implements an issue management bot that enables contributors and maintainers to manage issues through comment commands.
Fixes #91
Features
Assignment Commands
/assign/assign @user/unassign/unassign @userLabel Commands
/label <name>/unlabel <name>/<label-name>/bug)Issue State Commands
/close/reopen/helpImplementation Details
.github/workflows/issue-bot.ymlPermission Handling
GitHub's API only allows assigning users who:
For first-time contributors on issues they didn't create, the bot responds with a helpful message explaining the limitation and indicates a maintainer will assist.
Testing
/assign→ Should assign yourself/help→ Should display available commands/bug(if label exists) → Should add label (maintainers) or show permission error/assign→ Should explain GitHub's limitationPR Type
Enhancement
Description
Implements comprehensive issue management bot with command support
Supports assignment, labeling, and state management via comments
Enables label shortcuts and dynamic command recognition
Includes permission-based access control and error handling
Diagram Walkthrough
File Walkthrough
issue-bot.yml
Complete issue bot workflow implementation.github/workflows/issue-bot.yml
/assign,/unassign,/label,/unlabel,/close,/reopen, and/helpcommandswith 100+ labels
checks
/bug) and aggregates responsesinto single comment
unknown commands