aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-02-02 10:34:45 -0500
committerKevin O'Connor <kevin@koconnor.net>2021-02-02 10:36:38 -0500
commitc4633f945162a64a1ae9a58ce6a29f8b034cda2e (patch)
tree9288c01a94759f3510f8dd9b843b64c36f45d574 /.github
parent6a3f4c7ae6214a7964b140b195e777acfb1b6d68 (diff)
downloadkutter-c4633f945162a64a1ae9a58ce6a29f8b034cda2e.tar.gz
kutter-c4633f945162a64a1ae9a58ce6a29f8b034cda2e.tar.xz
kutter-c4633f945162a64a1ae9a58ce6a29f8b034cda2e.zip
workflows: Add invalid-label-bot.yaml script to warn on invalid tickets
Add a tool to add a comment on any issue that has the invalid label added to it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/invalid-label-bot.yaml40
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/invalid-label-bot.yaml b/.github/workflows/invalid-label-bot.yaml
new file mode 100644
index 00000000..33bd0854
--- /dev/null
+++ b/.github/workflows/invalid-label-bot.yaml
@@ -0,0 +1,40 @@
+# Enable the github stale issue bot tracker
+name: "Add comment to issues marked invalid"
+on:
+ issues:
+ types: [labeled]
+jobs:
+ comment:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/github-script@v3
+ with:
+ github-token: ${{secrets.GITHUB_TOKEN}}
+ script: |
+ if (context.payload.label.name != "invalid")
+ return;
+ msg = "Unfortunately, it appears the directions at"
+ + " https://www.klipper3d.org/Contact.html"
+ + " were not followed for this issue.\n"
+ + "\n"
+ + "We choose to use github as a place that people working on"
+ + " improving Klipper can share the results of their work."
+ + " We choose to not use github to help diagnose problems"
+ + " with a user's printer. We choose to not use github to"
+ + " answer user questions. We choose to not use github as"
+ + " a place to make requests.\n"
+ + "\n"
+ + "In the future, please follow the directions at:"
+ + " https://www.klipper3d.org/Contact.html\n"
+ + "This ticket will be automatically closed.\n"
+ + "\n"
+ + "Best regards,\n"
+ + "~ Your friendly GitIssueBot\n"
+ + "\n"
+ + "PS: I'm just an automated script, not a human being.";
+ github.issues.createComment({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body: msg
+ })