Skip to content

Commit 8bb585d

Browse files
Merge pull request #31 from Mastercard/feature/sonar-update
Updating Sonar workflow to check for forked PRs
2 parents d6ca02a + f581e51 commit 8bb585d

File tree

2 files changed

+4
-40
lines changed

2 files changed

+4
-40
lines changed

.github/workflows/sonar-scan-update.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/sonar-scan.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ name: Sonar
33
push:
44
branches:
55
- main
6-
pull_request:
6+
pull_request_target:
77
branches:
88
- main
99
schedule:
1010
- cron: 0 16 * * *
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14+
if: contains(github.event.pull_request.labels.*.name, 'tests can be run') ||
15+
github.event.pull_request.head.repo.full_name == github.repository ||
16+
github.event_name != 'pull_request_target'
1417
steps:
1518
- uses: actions/checkout@v2
1619
with:

0 commit comments

Comments
 (0)