Skip to content

Commit 643cd78

Browse files
author
Dennis Labordus
authored
Merge pull request #41 from com-pas/dependabot-pr-fix
Added Dependabot PR fix
2 parents 415d2e9 + 1090583 commit 643cd78

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/automate-projects.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44

55
name: Add issues and pull request to project boards
66

7-
on: [ issues, pull_request ]
7+
on: [ issues, pull_request, pull_request_target ]
88

99
jobs:
1010
github-actions-automate-projects:
1111
runs-on: ubuntu-latest
12+
13+
if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
1214
steps:
1315
- name: add-new-issues-to-repository-based-project-column
1416
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
@@ -19,7 +21,7 @@ jobs:
1921
GITHUB_PROJECT_COLUMN_NAME: To do
2022
- name: add-new-pull-request-to-repository-based-project-column
2123
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
22-
if: github.event_name == 'pull_request' && github.event.action == 'opened'
24+
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened'
2325
env:
2426
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2527
GITHUB_PROJECT_URL: https://github.com/com-pas/compas-scl-auto-alignment/projects/1
@@ -33,7 +35,7 @@ jobs:
3335
GITHUB_PROJECT_COLUMN_NAME: To do
3436
- name: add-new-pull-request-to-organization-based-project-column
3537
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
36-
if: github.event_name == 'pull_request' && github.event.action == 'opened'
38+
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened'
3739
env:
3840
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
3941
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/2

.github/workflows/sonarcloud-analysis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ on:
1212
branches:
1313
- 'main'
1414
- 'develop'
15+
pull_request_target:
16+
branches:
17+
- 'main'
18+
- 'develop'
1519

1620
jobs:
1721
build:
1822
name: SonarCloud
1923
runs-on: ubuntu-latest
2024
timeout-minutes: 15
2125

26+
if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
2227
steps:
2328
- name: Checkout
2429
uses: actions/checkout@v2
@@ -58,4 +63,5 @@ jobs:
5863
-Dsonar.projectKey=com-pas_compas-scl-auto-alignment \
5964
-Dsonar.organization=com-pas \
6065
-Dsonar.host.url=https://sonarcloud.io \
66+
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \
6167
clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar

0 commit comments

Comments
 (0)