Skip to content

Commit 00ee842

Browse files
author
Dennis Labordus
authored
Merge pull request com-pas#50 from com-pas/small-github-action-changes
Small change to GitHub Actions.
2 parents aca978a + c7979a6 commit 00ee842

File tree

1 file changed

+15
-27
lines changed

1 file changed

+15
-27
lines changed
Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,28 @@
1-
# SPDX-FileCopyrightText: 2021 Alliander N.V.
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
22
#
33
# SPDX-License-Identifier: Apache-2.0
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:
13-
- name: add-new-issues-to-repository-based-project-column
14-
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
15-
if: github.event_name == 'issues' && github.event.action == 'opened'
16-
env:
17-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18-
GITHUB_PROJECT_URL: https://github.com/com-pas/contributing/projects/2
19-
GITHUB_PROJECT_COLUMN_NAME: To do
20-
- name: add-new-pull-request-to-repository-based-project-column
21-
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
22-
if: github.event_name == 'pull_request' && github.event.action == 'opened'
23-
env:
24-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25-
GITHUB_PROJECT_URL: https://github.com/com-pas/contributing/projects/2
26-
GITHUB_PROJECT_COLUMN_NAME: To do
2715
- name: add-new-issues-to-organization-based-project-column
28-
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
2916
if: github.event_name == 'issues' && github.event.action == 'opened'
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
32-
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/1
33-
GITHUB_PROJECT_COLUMN_NAME: To do
17+
uses: alex-page/[email protected]
18+
with:
19+
project: CoMPAS Issues Overview Board
20+
column: To do
21+
repo-token: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
3422
- name: add-new-pull-request-to-organization-based-project-column
35-
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
36-
if: github.event_name == 'pull_request' && github.event.action == 'opened'
37-
env:
38-
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
39-
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/2
40-
GITHUB_PROJECT_COLUMN_NAME: To do
23+
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened'
24+
uses: alex-page/github[email protected]
25+
with:
26+
project: CoMPAS Pull Request Overview Board
27+
column: To do
28+
repo-token: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}

0 commit comments

Comments
 (0)