Forgejo drop-in for actions/stale: mark and close stale issues and PRs via the Forgejo API. No github.com.
  • JavaScript 80.7%
  • Shell 13.8%
  • Makefile 5.5%
Find a file
Stephen Way 61cf55b166
Some checks are pending
test / unit (push) Waiting to run
Repoint references from rasterstate to fjord org
Org migration: the action family now lives under fjord/. Repoints internal repo references (uses:, CI badges, docs, migration guides) at fjord/ and sets the action author to fjord. The old rasterstate copies are left in place.
2026-06-03 16:17:01 -07:00
.forgejo/workflows Initial release: forgejo-stale-action 2026-05-31 20:06:43 -07:00
src Initial release: forgejo-stale-action 2026-05-31 20:06:43 -07:00
tests Initial release: forgejo-stale-action 2026-05-31 20:06:43 -07:00
.gitignore Initial release: forgejo-stale-action 2026-05-31 20:06:43 -07:00
action.yml Repoint references from rasterstate to fjord org 2026-06-03 16:17:01 -07:00
CHANGELOG.md Initial release: forgejo-stale-action 2026-05-31 20:06:43 -07:00
LICENSE Initial release: forgejo-stale-action 2026-05-31 20:06:43 -07:00
Makefile Initial release: forgejo-stale-action 2026-05-31 20:06:43 -07:00
MIGRATION.md Repoint references from rasterstate to fjord org 2026-06-03 16:17:01 -07:00
README.md Repoint references from rasterstate to fjord org 2026-06-03 16:17:01 -07:00

Forgejo Stale

Forgejo's actions/stale. Mark issues and pull requests stale after a period of inactivity, then close them after a further period, via the Forgejo API. No github.com.

Part of the Fjord Actions bundle.

Usage

# .forgejo/workflows/stale.yml
on:
  schedule:
    - cron: '0 3 * * *'      # nightly
  workflow_dispatch:

permissions:
  issues: write
  pull-requests: write

jobs:
  stale:
    runs-on: [self-hosted, Linux]
    steps:
      - uses: https://rasterhub.com/fjord/forgejo-stale-action@v1
        with:
          days-before-stale: 60
          days-before-close: 7
          stale-issue-message: 'No activity for 60 days; marking stale. It will close in 7 days without further activity.'
          close-issue-message: 'Closing after 7 days stale. Comment to reopen.'
          exempt-labels: pinned, security
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}   # a Forgejo token on Forgejo

Run it on a schedule. Use dry-run: true first to see what it would do.

Inputs

Input Default Description
days-before-stale 60 Days of inactivity before marking stale.
days-before-close 7 Days after staling before closing. -1 to never close.
stale-label stale Label used to mark stale (created if missing).
stale-issue-message / stale-pr-message Comment posted when marking stale.
close-issue-message / close-pr-message Comment posted when closing.
exempt-labels Items with any of these labels are skipped.
only-labels Only consider items carrying ALL of these labels.
operations-per-run 100 Cap on state-changing operations per run.
dry-run false Log decisions without changing anything.
token GITHUB_TOKEN env Forgejo token with issues + PR write.
repository GITHUB_REPOSITORY Target repo.
api_url derived Forgejo API base.

Outputs

Output Description
staled Items marked stale this run.
closed Items closed this run.

See MIGRATION.md for differences from actions/stale.

License

MIT, see LICENSE.