summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorvojkovic <git@vojk.au>2026-07-26 16:53:10 +0000
committervojkovic <git@vojk.au>2026-07-26 16:53:10 +0000
commitb060c780d0751a55e75ad22f0d930c8965789db8 (patch)
treed26e3dfd2c9d13d7ee1f58e531284ef9917dafca /.github
parent6d8b55028063d2c36dd1b95d43ef1ebf82580698 (diff)
Revert "[ci] add ai policy checkbox detection"
This reverts commit 6d8b55028063d2c36dd1b95d43ef1ebf82580698.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ai-policy-checkbox.yml90
1 files changed, 0 insertions, 90 deletions
diff --git a/.github/workflows/ai-policy-checkbox.yml b/.github/workflows/ai-policy-checkbox.yml
deleted file mode 100644
index 6a8be127b..000000000
--- a/.github/workflows/ai-policy-checkbox.yml
+++ /dev/null
@@ -1,90 +0,0 @@
----
-name: AI Policy
-
-# yamllint disable-line rule:truthy
-on:
- issues:
- types: [opened]
- pull_request_target:
- types: [opened]
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.issue.number || github.event.pull_request.number }}
- cancel-in-progress: true
-
-permissions:
- contents: read
-
-jobs:
- issue:
- name: Check issue
- if: >-
- github.event_name == 'issues' &&
- github.event.sender.type != 'Bot' &&
- contains(fromJSON('["NONE","FIRST_TIMER","FIRST_TIME_CONTRIBUTOR"]'),
- github.event.issue.author_association)
- runs-on: ubuntu-26.04
- permissions:
- issues: write
- steps:
- - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const body = context.payload.issue.body || '';
- const lines = body.split(/\r?\n/).map((l) => l.trim().replace('[X]', '[x]'));
- const ref = '[AI Policy]: https://github.com/searxng/searxng/blob/master/AI_POLICY.rst';
- const box = '- [x] I read the [AI Policy] and hereby confirm that this issue'
- + ' conforms with the policy.';
- if (lines.includes(ref) && lines.includes(box)) return;
-
- const n = context.payload.issue.number;
- const msg = 'This issue was closed because the AI Policy box has not been ticked.\n\n'
- + 'Please open a new issue with the checkbox ticked.';
- await github.rest.issues.createComment({
- owner: context.repo.owner, repo: context.repo.repo, issue_number: n,
- body: msg,
- });
- await github.rest.issues.addLabels({
- owner: context.repo.owner, repo: context.repo.repo, issue_number: n,
- labels: ['invalid:slop'],
- });
- await github.rest.issues.update({
- owner: context.repo.owner, repo: context.repo.repo, issue_number: n,
- state: 'closed', state_reason: 'not_planned',
- });
-
- pull_request:
- name: Check pull request
- if: >-
- github.event_name == 'pull_request_target' &&
- github.event.sender.type != 'Bot' &&
- contains(fromJSON('["NONE","FIRST_TIMER","FIRST_TIME_CONTRIBUTOR"]'),
- github.event.pull_request.author_association)
- runs-on: ubuntu-26.04
- permissions:
- pull-requests: write
- steps:
- - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const body = context.payload.pull_request.body || '';
- const lines = body.split(/\r?\n/).map((l) => l.trim().replace('[X]', '[x]'));
- const ref = '[AI Policy]: https://github.com/searxng/searxng/blob/master/AI_POLICY.rst';
- const box = '- [x] **I hereby confirm that this PR conforms with the [AI Policy].**';
- if (lines.includes(ref) && lines.includes(box)) return;
-
- const n = context.payload.pull_request.number;
- const msg = 'This pull request was closed because the AI Policy box has not been'
- + ' ticked.\n\nPlease open a new pull request with the checkbox ticked.';
- await github.rest.issues.createComment({
- owner: context.repo.owner, repo: context.repo.repo, issue_number: n,
- body: msg,
- });
- await github.rest.issues.addLabels({
- owner: context.repo.owner, repo: context.repo.repo, issue_number: n,
- labels: ['invalid:slop'],
- });
- await github.rest.issues.update({
- owner: context.repo.owner, repo: context.repo.repo, issue_number: n,
- state: 'closed', state_reason: 'not_planned',
- });