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%
|
Some checks are pending
test / unit (push) Waiting to run
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. |
||
|---|---|---|
| .forgejo/workflows | ||
| src | ||
| tests | ||
| .gitignore | ||
| action.yml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| Makefile | ||
| MIGRATION.md | ||
| README.md | ||
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.