Skip to content

Commit 4851b8e

Browse files
committed
🔧 (close-pr.yaml): add condition to skip workflow for forked repositories
Add a conditional check to ensure the workflow only runs on pull requests from the main repository, not from forks. This prevents unnecessary execution of the workflow on forked repositories, optimizing resource usage and maintaining focus on relevant pull requests.
1 parent 62222cf commit 4851b8e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎.github/workflows/close-pr.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
jobs:
88
pr_cleanup:
99
runs-on: ubuntu-latest
10+
if: ${{ !(github.event.pull_request.head.repo.fork) }}
1011
steps:
1112
- uses: actions/create-github-app-token@v1
1213
id: app-token

0 commit comments

Comments
 (0)