2021-06-27 18:55:06 +02: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 16:34:45 +01: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 18:55:06 +02:00
|
|
|
if (context.payload.label.name != "not on github")
|
2021-02-02 16:34:45 +01:00
|
|
|
return;
|
2021-05-03 00:46:34 +02: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 16:31:03 +02:00
|
|
|
+ " Instead, see the contact directions at:"
|
2021-07-28 00:59:46 +02:00
|
|
|
+ " https://www.klipper3d.org/Contact.html"
|
2021-05-06 20:28:09 +02:00
|
|
|
+ "\n\n"
|
2021-03-22 18:44:21 +01: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 19:14:30 +01:00
|
|
|
+ " problems with a printer.)"
|
2021-05-06 20:28:09 +02:00
|
|
|
+ "\n\n"
|
|
|
|
+ "Please follow the directions at:"
|
2021-07-28 00:59:46 +02:00
|
|
|
+ " https://www.klipper3d.org/Contact.html"
|
2021-05-06 20:28:09 +02:00
|
|
|
+ "\n\n"
|
|
|
|
+ "This ticket will be automatically closed."
|
|
|
|
+ "\n\n"
|
2021-02-02 16:34:45 +01:00
|
|
|
+ "Best regards,\n"
|
2021-05-06 20:28:09 +02:00
|
|
|
+ "~ Your friendly GitIssueBot"
|
|
|
|
+ "\n\n"
|
2021-02-02 16:34:45 +01: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
|
|
|
|
})
|