2021-05-03 01:46:34 +03:00
|
|
|
# Add a comment to github issues marked with the invalid label
|
2021-02-02 18:34:45 +03:00
|
|
|
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;
|
2021-05-03 01:46:34 +03:00
|
|
|
msg = "It looks like this ticket is a request for help"
|
|
|
|
+ " (or similar)."
|
|
|
|
+ " Many helpful people will not see your message here and you"
|
|
|
|
+ " are unlikely to get a useful response."
|
|
|
|
+ " Please close this ticket and follow the contact directions"
|
2021-05-03 18:06:09 +03:00
|
|
|
+ " at:"
|
2021-02-02 18:34:45 +03:00
|
|
|
+ " https://www.klipper3d.org/Contact.html"
|
|
|
|
+ "\n"
|
2021-03-22 20:44:21 +03:00
|
|
|
+ "We use github to share the results of work done to"
|
|
|
|
+ " improve Klipper. We don't use github for requests."
|
|
|
|
+ " (In particular, we don't use github for feature"
|
|
|
|
+ " requests, to answer questions, nor to help diagnose"
|
2021-03-26 21:14:30 +03:00
|
|
|
+ " problems with a printer.)"
|
2021-02-02 18:34:45 +03:00
|
|
|
+ "\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
|
|
|
|
})
|