Skip to content
Merged
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
32 changes: 32 additions & 0 deletions .github/workflows/ai-policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: AI tools policy

on:
issues:
types: [labeled]
# Labeling a pull request triggers no event whose token can close one
# from a fork without pull_request_target, so an hourly run picks them up.
schedule:
- cron: "17 * * * *"

permissions:
issues: write
pull-requests: write

jobs:
close:
if: github.event_name == 'schedule' || github.event.label.name == 'slop'
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
COMMENT: Closed under the [AI tools policy](https://github.com/publiccodeyml/publiccode.yml/blob/main/AI_POLICY.md).
steps:
- run: |
for n in $(gh issue list --label slop --state open --json number --jq '.[].number'); do
gh issue close "$n" --reason "not planned" --comment "$COMMENT"
gh issue lock "$n"
done
for n in $(gh pr list --label slop --state open --json number --jq '.[].number'); do
gh pr close "$n" --comment "$COMMENT"
gh pr lock "$n"
done
6 changes: 6 additions & 0 deletions AI_POLICY.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ We do not run AI detectors and writing style is not evidence. Detectors
misfire on people who write in a second language, as most of this
community does. A maintainer acts on what the content shows, for
example code or claims the author cannot explain.

## Automation

When a maintainer adds the `slop` label to an issue or a pull request,
a workflow links this policy, then closes and locks it. Issues are
closed right away, pull requests within the hour.