2021-06-27 19:55:06 +03:00
|
|
|
# Add a comment to github issues marked with the "not on github" label
|
|
|
|
name: "Add comment to issues marked 'not on github'"
|
2021-02-02 18:34:45 +03:00
|
|
|
on:
|
|
|
|
issues:
|
|
|
|
types: [labeled]
|
|
|
|
jobs:
|
|
|
|
comment:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/github-script@v3
|
|
|
|
with:
|
|
|
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
script: |
|
2021-06-27 19:55:06 +03:00
|
|
|
if (context.payload.label.name != "not on github")
|
2021-02-02 18:34:45 +03:00
|
|
|
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."
|
2021-05-17 17:31:03 +03:00
|
|
|
+ " Instead, see the contact directions at:"
|
2021-07-28 01:59:46 +03:00
|
|
|
+ " https://www.klipper3d.org/Contact.html"
|
2021-05-06 21:28:09 +03:00
|
|
|
+ "\n\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-05-06 21:28:09 +03:00
|
|
|
+ "\n\n"
|
|
|
|
+ "Please follow the directions at:"
|
2021-07-28 01:59:46 +03:00
|
|
|
+ " https://www.klipper3d.org/Contact.html"
|
2021-05-06 21:28:09 +03:00
|
|
|
+ "\n\n"
|
|
|
|
+ "This ticket will be automatically closed."
|
|
|
|
+ "\n\n"
|
2021-02-02 18:34:45 +03:00
|
|
|
+ "Best regards,\n"
|
2021-05-06 21:28:09 +03:00
|
|
|
+ "~ Your friendly GitIssueBot"
|
|
|
|
+ "\n\n"
|
2021-02-02 18:34:45 +03:00
|
|
|
+ "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
|
|
|
|
})
|