Skip to content

Commit cb97232

Browse files
authored
chore(actions): stop spamming stale notification for forks (#26578)
Closes `n/a` Great project, but please stop spamming on stale notification for forks, thanks! <img width="1374" alt="image" src="https://github.com/aws/aws-cdk/assets/984415/2581a5a9-6ebc-4b7a-91ce-48072997dda5"> ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 0e2c169 commit cb97232

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Diff for: .github/workflows/close-stale-issues.yml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
jobs:
1010
cleanup:
11+
# this workflow will always fail in forks; bail if this isn't running in the upstream
12+
if: github.repository == 'aws/aws-cdk'
1113
permissions:
1214
issues: write
1315
contents: read

Diff for: .github/workflows/close-stale-prs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
workflow_dispatch:
66
jobs:
77
close-stale-prs:
8+
# this workflow will always fail in forks; bail if this isn't running in the upstream
9+
if: github.repository == 'aws/aws-cdk'
810
permissions:
911
pull-requests: write
1012
runs-on: ubuntu-latest

Diff for: .github/workflows/handle-stale-discussions.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77

88
jobs:
99
handle-stale-discussions:
10+
# this workflow will always fail in forks; bail if this isn't running in the upstream
11+
if: github.repository == 'aws/aws-cdk'
1012
name: Handle stale discussions
1113
runs-on: ubuntu-latest
1214
permissions:
@@ -15,4 +17,4 @@ jobs:
1517
- name: Stale discussions action
1618
uses: aws-github-ops/handle-stale-discussions@v1
1719
env:
18-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
20+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)