Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,23 @@ body:
Thanks for taking the time to fill out this bug report!

Please note that we use GitHub issues exclusively for bug reports and feature requests. For support requests, please use our other support channels to get help.

> [!IMPORTANT]
> Our [AI policy](https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#issues) applies to issues too. Write this issue yourself and disclose any AI use below. Issues that read as unreviewed AI output will be closed and locked.
- type: textarea
id: description
attributes:
label: Description
description: Please provide a clear and concise description of the bug or issue.
validations:
required: true
- type: textarea
id: ai-disclosure
attributes:
label: AI Disclosure
description: How did you use AI to find or write up this issue, if at all? Write "None" if you didn't.
validations:
required: true
- type: input
id: version
attributes:
Expand Down Expand Up @@ -100,6 +110,13 @@ body:
options:
- label: Yes, I have searched existing issues.
required: true
- type: checkboxes
id: ai-policy
attributes:
label: AI Policy
options:
- label: I have read the [AI policy](https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#ai-assistance-notice) and this issue follows it.
required: true
- type: checkboxes
id: terms
attributes:
Expand Down
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ body:

Use this template for documentation issues (typos, unclear steps, missing info, outdated screenshots).
For app bugs or feature ideas, please use the other templates.

> [!IMPORTANT]
> Our [AI policy](https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#issues) applies to issues too. Write this issue yourself and disclose any AI use below. Issues that read as unreviewed AI output will be closed and locked.
- type: input
id: doc-location
attributes:
Expand Down Expand Up @@ -38,6 +41,13 @@ body:
description: Describe the issue in the docs.
validations:
required: true
- type: textarea
id: ai-disclosure
attributes:
label: AI Disclosure
description: How did you use AI to find or write up this issue, if at all? Write "None" if you didn't.
validations:
required: true
- type: textarea
id: suggested-fix
attributes:
Expand All @@ -53,6 +63,13 @@ body:
options:
- label: Yes, I have searched existing issues.
required: true
- type: checkboxes
id: ai-policy
attributes:
label: AI Policy
options:
- label: I have read the [AI policy](https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#ai-assistance-notice) and this issue follows it.
required: true
- type: checkboxes
id: terms
attributes:
Expand Down
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,23 @@ body:
Thanks for taking the time to fill out this feature request!

Please note that we use GitHub issues exclusively for bug reports and feature requests. For support requests, please use our other support channels to get help.

> [!IMPORTANT]
> Our [AI policy](https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#issues) applies to issues too. Write this issue yourself and disclose any AI use below. Issues that read as unreviewed AI output will be closed and locked.
- type: textarea
id: description
attributes:
label: Description
description: Is your feature request related to a problem? If so, please provide a clear and concise description of the problem; e.g., "I'm always frustrated when [...]."
validations:
required: true
- type: textarea
id: ai-disclosure
attributes:
label: AI Disclosure
description: How did you use AI to find or write up this issue, if at all? Write "None" if you didn't.
validations:
required: true
- type: textarea
id: desired-behavior
attributes:
Expand All @@ -36,6 +46,13 @@ body:
options:
- label: Yes, I have searched existing issues.
required: true
- type: checkboxes
id: ai-policy
attributes:
label: AI Policy
options:
- label: I have read the [AI policy](https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#ai-assistance-notice) and this issue follows it.
required: true
- type: checkboxes
id: terms
attributes:
Expand Down
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ body:
value: |
Maintainers / contributors: use this for internal tasks (CI, workflows, tooling, refactors).
If you're reporting a user-facing bug or requesting a feature, use the other templates.

> [!IMPORTANT]
> Our [AI policy](https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#issues) applies to issues too. Write this issue yourself and disclose any AI use below. Issues that read as unreviewed AI output will be closed and locked.
- type: dropdown
id: area
attributes:
Expand All @@ -30,6 +33,13 @@ body:
description: What needs doing and why?
validations:
required: true
- type: textarea
id: ai-disclosure
attributes:
label: AI Disclosure
description: How did you use AI to find or write up this issue, if at all? Write "None" if you didn't.
validations:
required: true
- type: textarea
id: acceptance
attributes:
Expand All @@ -55,6 +65,13 @@ body:
options:
- label: Yes, I have searched existing issues.
required: true
- type: checkboxes
id: ai-policy
attributes:
label: AI Policy
options:
- label: I have read the [AI policy](https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#ai-assistance-notice) and this issue follows it.
required: true
- type: checkboxes
id: terms
attributes:
Expand Down
6 changes: 5 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

- Fixes #XXXX

## AI Disclosure

<!--- How did you use AI for this PR, if at all? Write "None" if you didn't. -->
<!--- See our policy: https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#disclosure-requirements -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
Expand All @@ -25,7 +30,6 @@
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] I have read and followed the contribution [guidelines](https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md).
- [ ] Disclosed any use of AI (see our [policy](https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#ai-assistance-notice))
- [ ] I have updated the documentation accordingly.
- [ ] All new and existing tests passed.
- [ ] Successful build `pnpm build`
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/actions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ workflows:
- 'actions/checkout@v7.0.1'
- 'actions/create-github-app-token@v3.3.0'
- 'helm/chart-testing-action@v2.9.0'
'.github/workflows/seerr-labeller.yml': []
'.github/workflows/seerr-labeller.yml':
- 'actions/github-script@v9.0.0'
'.github/workflows/stale.yml':
- 'actions/stale@v11.0.0'
'.github/workflows/test-docs.yml':
Expand Down
83 changes: 82 additions & 1 deletion .github/workflows/seerr-labeller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request_target:
types: [labeled, unlabeled, reopened]
issues:
types: [labeled, unlabeled, reopened]
types: [opened, labeled, unlabeled, reopened]

permissions: {}

Expand Down Expand Up @@ -111,3 +111,84 @@ jobs:
run: |
gh issue edit "$NUMBER" -R "$GH_REPO" --remove-label "support" || true
gh issue unlock "$NUMBER" -R "$GH_REPO" || true

ai-disclosure:
if: >
github.event_name == 'issues' &&
github.event.issue.user.type != 'Bot' &&
(github.event.action == 'opened' ||
(github.event.action == 'labeled' && github.event.label.name == 'ai-disclosure'))
runs-on: ubuntu-26.04
concurrency:
group: ai-disclosure-${{ github.event.issue.number }}
permissions:
issues: write
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
steps:
- name: Detect a missing or contradicted AI disclosure
id: detect
if: github.event.action == 'opened'
uses: actions/github-script@v9.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const SIGNATURES = [
'utm_source=chatgpt.com',
'Generated with [Claude Code]',
'chatgpt.com/share/',
'chat.openai.com/share/',
'claude.ai/share/',
'gemini.google.com/share/',
'g.co/gemini/share/',
'perplexity.ai/search/',
'grok.com/share/',
];
const TOOLS = /chatgpt|claude|copilot|gemini|gpt|llm|cursor|perplexity|deepseek|grok|translat/i;
const issue = context.payload.issue;

let permission = 'none';
try {
const { data } = await github.rest.repos.getCollaboratorPermissionLevel({
owner: context.repo.owner,
repo: context.repo.repo,
username: issue.user.login,
});
permission = data.permission;
} catch (e) {
console.log('Could not look up author permission:', e.message);
}
if (['admin', 'write'].includes(permission)) return 'false';

const body = (issue.body ?? '').replace(/\r\n?/g, '\n');
const match = body.match(/(?:^|\n)### AI Disclosure[ \t]*(?=\n|$)([\s\S]*?)(?=\n### |$)/);
const answer = match ? match[1].trim() : '';
if (!answer) return 'true';
return String(
/^(none|no|n\/?a)\b/i.test(answer) &&
!TOOLS.test(answer) &&
SIGNATURES.some((s) => body.includes(s))
);

- name: Ask for an AI disclosure
if: github.event.action == 'labeled' || steps.detect.outputs.result == 'true'
shell: bash
env:
BODY: >
:wave: @${{ env.ISSUE_AUTHOR }}, issues are a contribution as well, and they fall under our [AI policy](https://github.com/seerr-team/seerr/blob/develop/CONTRIBUTING.md#ai-assistance-notice).

Please update the AI Disclosure in this issue, or add one if it's missing, to say how you used AI to find or write it up, if at all. Issues must be written in your own words. AI-assisted translation is fine, but please note it.
run: |
retry() { n=0; until "$@"; do n=$((n+1)); [ $n -ge 3 ] && break; echo "retry $n: $*" >&2; sleep 2; done; }
retry gh issue comment "$NUMBER" -R "$GH_REPO" -b "$BODY" || true

- name: Label the issue
if: steps.detect.outputs.result == 'true'
shell: bash
run: |
retry() { n=0; until "$@"; do n=$((n+1)); [ $n -ge 3 ] && break; echo "retry $n: $*" >&2; sleep 2; done; }
retry gh issue edit "$NUMBER" -R "$GH_REPO" --add-label ai-disclosure || true
16 changes: 13 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Depending on maintainer availability and how much review a change needs, it can

> [!IMPORTANT]
>
> Issues and comments are contributions as well, and this policy covers them.
>
> AI-driven contributions are not allowed and will be rejected, even if you reviewed and tested them. This is an open-source project maintained by volunteers, and our time goes to reviewing your work, not your AI's. We have no issue with contributors using AI tools as an aid, but the contribution has to be yours, and it is your responsibility to make sure it meets our quality standards.
>
> **We expect AI-assisted development, not AI-driven development.** Use AI as a tool to help you understand the codebase, debug, or scaffold something you then write yourself. If an AI wrote the change, reviewing it, testing it, and submitting it yourself does not make it AI-assisted. The approach and the implementation have to be yours, and you have to understand every line of it. Whether a PR is AI-assisted or AI-driven is the maintainers' call, based on how the contribution reads and how you handle review, and claiming you drove it doesn't override that. We have been increasingly receiving low-effort, fully AI-generated PRs and will not tolerate them. Contributors who repeatedly submit AI-driven work may be banned.
Expand All @@ -37,13 +39,21 @@ Depending on maintainer availability and how much review a change needs, it can
> **Read and follow the [Contributing Guide](CONTRIBUTING.md) before submitting.**
> If your AI tool generates its own PR description format, it is your responsibility to rewrite it to follow our template before submitting, and rewrite means write the content yourself, not relabel the AI's output under our section headers. An incomplete PR template tells maintainers that insufficient review has been performed on the submission, regardless of the actual code quality. We may close such PRs without review.
>
> If you are using **any kind of AI assistance** to contribute to Seerr, it must be disclosed in the pull request.
> If you are using **any kind of AI assistance** to contribute to Seerr, it must be disclosed in the pull request or issue.

### Issues

Write your issue yourself, using the issue form. Bypassing the form breaks this policy on its own. Moving AI output under the form's headings doesn't count as filling it in.

For bug reports, describe what happened, how to reproduce it, your logs and your setup. Don't include a root cause or diagnosis that came from AI, as that's where wrong details creep in. If you found the cause yourself and understand it, put it under Additional Context.

AI-generated issues will be closed and locked.

### Disclosure Requirements

If you are using any kind of AI assistance while contributing to Seerr, **this must be disclosed in the pull request description**, along with the extent to which AI assistance was used (e.g., docs only vs. code generation).
If you are using any kind of AI assistance while contributing to Seerr, **this must be disclosed in the AI Disclosure section of your pull request or issue**, along with the extent to which AI assistance was used (e.g., docs only vs. code generation).

PR responses (comments, review replies) must be written in your own words, per the Expectations below. The one exception is AI-assisted translation, if you use AI to translate a response into English, disclose that here too.
Issue comments and PR responses (comments, review replies) must be written in your own words, per the Expectations below. The one exception is AI-assisted translation, if you use AI to translate a response into English, disclose that here too.

As a small exception, trivial tab-completion doesn't need to be disclosed, so long as it is limited to single keywords or short phrases.

Expand Down
28 changes: 19 additions & 9 deletions bin/check-pr-template.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (!bodyFile) {
process.exit(2);
}

const body = readFileSync(resolve(bodyFile), 'utf8');
const body = readFileSync(resolve(bodyFile), 'utf8').replace(/\r\n?/g, '\n');
const issues = [];

const MAINTAINER_PERMISSIONS = ['admin', 'write'];
Expand All @@ -33,7 +33,9 @@ const stripComments = (s) => {

const stripFixesPlaceholder = (s) => s.replace(/-\s*Fixes\s*`?#XXXX`?/gi, '');

const descriptionMatch = body.match(/## Description\s*\n([\s\S]*?)(?=\n## |$)/);
const descriptionMatch = body.match(
/(?:^|\n) {0,3}## Description[ \t]*(?=\n|$)([\s\S]*?)(?=\n {0,3}## |$)/
);
const descriptionContent = descriptionMatch
? stripFixesPlaceholder(stripComments(descriptionMatch[1])).trim()
: '';
Expand All @@ -45,7 +47,7 @@ if (!descriptionContent) {
}

const testingMatch = body.match(
/## How Has This Been Tested\?\s*\n([\s\S]*?)(?=\n## |$)/
/(?:^|\n) {0,3}## How Has This Been Tested\?[ \t]*(?=\n|$)([\s\S]*?)(?=\n {0,3}## |$)/
);
const testingContent = testingMatch
? stripComments(testingMatch[1]).trim()
Expand All @@ -55,7 +57,9 @@ if (!testingContent) {
issues.push('**How Has This Been Tested?** section is empty.');
}

const checklistMatch = body.match(/## Checklist:\s*\n([\s\S]*?)$/);
const checklistMatch = body.match(
/(?:^|\n) {0,3}## Checklist:[ \t]*\n([\s\S]*?)$/
);
const checklistContent = checklistMatch ? checklistMatch[1] : '';

const totalBoxes = (checklistContent.match(/- \[[ x]\]/gi) || []).length;
Expand All @@ -75,11 +79,17 @@ if (
issues.push('The **contribution guidelines** checkbox has not been checked.');
}

if (
!isMaintainer &&
!/- \[x\] Disclosed any use of AI/i.test(checklistContent)
) {
issues.push('The **AI disclosure** checkbox has not been checked.');
const aiMatch = body.match(
/(?:^|\n) {0,3}## AI Disclosure[ \t]*(?=\n|$)([\s\S]*?)(?=\n {0,3}## |$)/
);
const aiContent = aiMatch ? stripComments(aiMatch[1]).trim() : '';
const legacyAiBox =
!aiMatch && /- \[x\] Disclosed any use of AI/i.test(checklistContent);

if (!isMaintainer && !aiContent && !legacyAiBox) {
issues.push(
'**AI Disclosure** section is empty. Describe how you used AI, or write "None".'
);
}

if (/-\s*Fixes\s*`?#XXXX`?/i.test(body)) {
Expand Down
Loading