Auto-respond on specific label #25062
-
I was wondering if there exists a GitHub Action for sending specific canned responses (either from the workflow file itself or perhaps pre-made markdown files) if an issue receives a specific label (Maybe even with actions like closing the issue/PR). Would it even be beneficial at all to use a GitHub Action for this in the first place, since it requires to have a server/system to be set up and load all materials and resources, etc. Right now I use a GitHub App (Bot) for doing the auto-message stuff, but I would prefer to switch to GitHub Actions for that if it is possible. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Firstly you need to trigger the workflow with ‘issue’ event, get the new label name from context value ‘${{ github.event.label.name }}’, according to the label name, determin the respond then. For instance, below code will check if new label ‘bug’ is added and respond accordingly. Hope it helps!
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer, Now I still wonder if it is worth it, to have such a GitHub Action in the first place, due to it requiring a OS to be setup for just a message to be send. |
Beta Was this translation helpful? Give feedback.
Firstly you need to trigger the workflow with ‘issue’ event, get the new label name from context value ‘${{ github.event.label.name }}’, according to the label name, determin the respond then.
For instance, below code will check if new label ‘bug’ is added and respond accordingly. Hope it helps!