Skip to content

Commit abe3445

Browse files
committed
fix(ci-cd): don't run labeler on PRs from forks
instead use a cron schedule to label PRs from forks
1 parent e0fd3e0 commit abe3445

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/labeler.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@ on:
33
pull_request:
44
types: [opened, synchronize]
55
workflow_dispatch:
6+
schedule:
7+
# run every full hour (to still label PRs from forks)
8+
- cron: '0 * * * *'
69

710
jobs:
811
labeler:
912
permissions:
1013
contents: read
1114
pull-requests: write
1215
issues: write
16+
# don't run on PRs from forks (token has no write permissions)
17+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
1318
name: "Labeler"
1419
runs-on: ubuntu-latest
1520
steps:

0 commit comments

Comments
 (0)