Files
AntennaPod/.github/workflows/issue-comment.yml
Hans-Peter Lehmann 6c69e0db15 Enforce issue template and reject issue assignment automatically (#8572)
### Description

We are receiving a lot of AI generated issues recently.
- Automatically apply the corresponding labels if they are missing
- Strengthen the AI instructions
- Close issues that do not follow the issue template (leaving a comment)
- While at it, also leave a comment when someone wants to be assigned to
an issue

### Checklist
<!-- 
To help us keep the issue tracker clean and work as efficient as
possible,
  please make sure that you have done all of the following.
You can tick the boxes below by placing an x inside the brackets like
this: [x]
-->
- [x] I have read the contribution guidelines:
https://github.com/AntennaPod/AntennaPod/blob/develop/CONTRIBUTING.md#submit-a-pull-request
- [x] I have performed a self-review of my code, going through my
changes line by line and carefully considering why this line change is
necessary
- [x] I have run the automated code checks using `./gradlew checkstyle
lint`
- [x] My code follows the style guidelines of the AntennaPod project:
https://antennapod.org/contribute/develop/app/code-style
- [x] I have mentioned the corresponding issue and the relevant keyword
(e.g., "Closes: #xy") in the description (see
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
- [x] If it is a core feature, I have added automated tests
2026-07-06 17:56:13 +02:00

30 lines
1.1 KiB
YAML

name: Issue comment
on:
issue_comment:
types: [created]
permissions:
issues: write
jobs:
issue-comment:
if: github.event.issue.pull_request == null
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v8
with:
script: |
const body = context.payload.comment.body || '';
const assignmentRequest = /\b(please|can|could|would)\b.{0,40}\bassign\b|\bassign (me|this|it)\b|\bbe assigned\b/i;
if (!assignmentRequest.test(body)) return;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
body: 'Thanks for your interest! It looks like you asked to be assigned to this issue. '
+ 'We do not assign issues. Anyone is free to open a pull request at any time. '
+ 'Please have a look at our [contribution guidelines](https://github.com/AntennaPod/AntennaPod/blob/develop/CONTRIBUTING.md) before getting started.',
});