require-forgejo-actions-job-timeout-minutes
Require explicit timeout-minutes for Forgejo workflow jobs.
Targeted pattern scopeâ
This rule scans .forgejo/workflows/*.{yml,yaml} and checks job definitions under jobs: for timeout-minutes.
It skips reusable workflow jobs declared with jobs.<job_id>.uses.
What this rule reportsâ
This rule reports Forgejo workflow jobs that do not declare timeout-minutes.
Why this rule existsâ
Forgejo Actions supports jobs.<job_id>.timeout-minutes. Explicit timeouts limit the blast radius of stuck runners and reduce long-running accidental CI consumption.
â Incorrectâ
name: CI
on:
push:
jobs:
test:
runs-on: docker
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
â Correctâ
name: CI
on:
push:
jobs:
test:
runs-on: docker
timeout-minutes: 12
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
ESLint flat config exampleâ
import repoPlugin from "eslint-plugin-repo";
export default [
repoPlugin.configs.codeberg,
{
plugins: { "repo-compliance": repoPlugin },
rules: {
"repo-compliance/require-forgejo-actions-job-timeout-minutes": "error",
},
},
];
When not to use itâ
Disable this rule only if timeout governance is guaranteed externally (for example by generated workflow templates).
Rule catalog ID: R029