|
1 | | -# SPDX-FileCopyrightText: 2021 Alliander N.V. |
| 1 | +# SPDX-FileCopyrightText: 2022 Alliander N.V. |
2 | 2 | # |
3 | 3 | # SPDX-License-Identifier: CC-BY-4.0 |
4 | 4 |
|
5 | 5 | name: Add issues and pull request to project boards |
6 | 6 |
|
7 | | -on: [ issues, pull_request ] |
| 7 | +on: [ issues, pull_request, pull_request_target ] |
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | github-actions-automate-projects: |
11 | 11 | 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') }} |
12 | 14 | 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/compas-architecture/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/compas-architecture/projects/2 |
26 | | - GITHUB_PROJECT_COLUMN_NAME: To do |
27 | 15 | - name: add-new-issues-to-organization-based-project-column |
28 | | - uses: docker://takanabe/github-actions-automate-projects:v0.0.1 |
29 | 16 | 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 | + |
| 18 | + with: |
| 19 | + project: CoMPAS Issues Overview Board |
| 20 | + column: To do |
| 21 | + repo-token: ${{ secrets.ORG_GITHUB_ACTION_SECRET }} |
34 | 22 | - 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