Skip to content

Commit

Permalink
CI: disable stale workflow on forks (#7535)
Browse files Browse the repository at this point in the history
The stale workflow will run unconditionally, but will fail on forks due to
`STALEBOT_PAT` not being set. Trigger the workflow *only* if we are on the
main repo, where we can guarantee the PAT. Also formats the YML syntax to be
slightly more readable.
  • Loading branch information
NotAShelf authored Aug 26, 2024
1 parent 72c7818 commit 09dbcab
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: '7 */4 * * *'
- cron: "7 */4 * * *"
workflow_dispatch:

jobs:
stale:

if: github.repository == 'hyprwm/Hyprland'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.STALEBOT_PAT }}
stale-issue-label: 'stale'
stale-pr-label: 'stale'
operations-per-run: 40
days-before-close: -1
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.STALEBOT_PAT }}
stale-issue-label: "stale"
stale-pr-label: "stale"
operations-per-run: 40
days-before-close: -1

0 comments on commit 09dbcab

Please sign in to comment.