Skip to content
Latchkey

Mark as AI Slop workflow (louislam/uptime-kuma)

The Mark as AI Slop workflow from louislam/uptime-kuma, explained and optimized by Latchkey.

A

CI health: A - excellent

Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: louislam/uptime-kuma.github/workflows/ai-slop.ymlLicense MITView source

What it does

This is the Mark as AI Slop workflow from the louislam/uptime-kuma repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Mark as AI Slop

on:
  pull_request_target:
    types:
      - labeled
  issues:
    types:
      - labeled

permissions: {}

jobs:
  handle-ai-slop:
    if: github.event.label.name == 'ai-slop' && github.repository == 'louislam/uptime-kuma'
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
      issues: write
    steps:
      - name: Rename title and clear body
        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
        with:
          script: |
            const repo = { owner: context.repo.owner, repo: context.repo.repo };
            const isPR = !!context.payload.pull_request;
            const issueNumber = isPR ? context.payload.pull_request.number : context.payload.issue.number;

            if (isPR) {
                await github.rest.pulls.update({
                    ...repo,
                    pull_number: issueNumber,
                    title: "[๐Ÿšจโš ๏ธAI Slopโš ๏ธ๐Ÿšจ] WARNING: THIS GUY CREATED AI SLOP, DO NOT TRUST!",
                    body: ""
                });
            } else {
                await github.rest.issues.update({
                    ...repo,
                    issue_number: issueNumber,
                    title: "[๐Ÿšจโš ๏ธAI Slopโš ๏ธ๐Ÿšจ] WARNING: THIS GUY CREATED AI SLOP, DO NOT TRUST!",
                    body: ""
                });
            }

            const comments = [
                "๐Ÿšจ AI-generated code submitted without review puts the entire project at risk.",
                "โš ๏ธ Blindly pasting AI output without understanding it is not a contribution - it's a liability.",
                "๐Ÿค– AI slop wastes maintainers' time reviewing code that was never understood by the submitter.",
                "๐Ÿ’€ Submitting unreviewed AI-generated code can introduce subtle bugs that are very hard to detect.",
                "๐Ÿ” Real open-source contribution requires understanding every line you submit - no shortcuts.",
                "๐Ÿ›‘ AI slop undermines the trust and quality standards this project has worked hard to maintain.",
                "๐Ÿ“‰ Code you don't understand cannot be properly tested, debugged, or maintained by you later.",
                "๐Ÿง  A good developer uses AI as a tool to assist thinking, not as a replacement for it.",
                "โ›” This issue/pull request has been flagged as AI slop and its author may face a permanent ban.",
                "๐Ÿ† Respect the community: read the AGENTS.md, understand the code, and test before submitting."
            ];

            for (const body of comments) {
                await github.rest.issues.createComment({ ...repo, issue_number: issueNumber, body });
            }

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Mark as AI Slop
 
on:
  pull_request_target:
    types:
      - labeled
  issues:
    types:
      - labeled
 
permissions: {}
 
jobs:
  handle-ai-slop:
    timeout-minutes: 30
    if: github.event.label.name == 'ai-slop' && github.repository == 'louislam/uptime-kuma'
    runs-on: latchkey-small
    permissions:
      pull-requests: write
      issues: write
    steps:
      - name: Rename title and clear body
        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
        with:
          script: |
            const repo = { owner: context.repo.owner, repo: context.repo.repo };
            const isPR = !!context.payload.pull_request;
            const issueNumber = isPR ? context.payload.pull_request.number : context.payload.issue.number;
 
            if (isPR) {
                await github.rest.pulls.update({
                    ...repo,
                    pull_number: issueNumber,
                    title: "[๐Ÿšจโš ๏ธAI Slopโš ๏ธ๐Ÿšจ] WARNING: THIS GUY CREATED AI SLOP, DO NOT TRUST!",
                    body: ""
                });
            } else {
                await github.rest.issues.update({
                    ...repo,
                    issue_number: issueNumber,
                    title: "[๐Ÿšจโš ๏ธAI Slopโš ๏ธ๐Ÿšจ] WARNING: THIS GUY CREATED AI SLOP, DO NOT TRUST!",
                    body: ""
                });
            }
 
            const comments = [
                "๐Ÿšจ AI-generated code submitted without review puts the entire project at risk.",
                "โš ๏ธ Blindly pasting AI output without understanding it is not a contribution - it's a liability.",
                "๐Ÿค– AI slop wastes maintainers' time reviewing code that was never understood by the submitter.",
                "๐Ÿ’€ Submitting unreviewed AI-generated code can introduce subtle bugs that are very hard to detect.",
                "๐Ÿ” Real open-source contribution requires understanding every line you submit - no shortcuts.",
                "๐Ÿ›‘ AI slop undermines the trust and quality standards this project has worked hard to maintain.",
                "๐Ÿ“‰ Code you don't understand cannot be properly tested, debugged, or maintained by you later.",
                "๐Ÿง  A good developer uses AI as a tool to assist thinking, not as a replacement for it.",
                "โ›” This issue/pull request has been flagged as AI slop and its author may face a permanent ban.",
                "๐Ÿ† Respect the community: read the AGENTS.md, understand the code, and test before submitting."
            ];
 
            for (const body of comments) {
                await github.rest.issues.createComment({ ...repo, issue_number: issueNumber, body });
            }
 

What changed

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow