diff --git a/.github/workflows/automate-projects.yml b/.github/workflows/automate-projects.yml index ec3a5ca..a0ac9e9 100644 --- a/.github/workflows/automate-projects.yml +++ b/.github/workflows/automate-projects.yml @@ -4,11 +4,13 @@ name: Add issues and pull request to project boards -on: [ issues, pull_request ] +on: [issues, pull_request, pull_request_target] jobs: github-actions-automate-projects: runs-on: ubuntu-latest + + if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }} steps: - name: add-new-issues-to-repository-based-project-column uses: docker://takanabe/github-actions-automate-projects:v0.0.1 @@ -19,7 +21,7 @@ jobs: GITHUB_PROJECT_COLUMN_NAME: To do - name: add-new-pull-request-to-repository-based-project-column uses: docker://takanabe/github-actions-automate-projects:v0.0.1 - if: github.event_name == 'pull_request' && github.event.action == 'opened' + if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_PROJECT_URL: https://github.com/com-pas/compas-deployment/projects/1 @@ -33,7 +35,7 @@ jobs: GITHUB_PROJECT_COLUMN_NAME: To do - name: add-new-pull-request-to-organization-based-project-column uses: docker://takanabe/github-actions-automate-projects:v0.0.1 - if: github.event_name == 'pull_request' && github.event.action == 'opened' + if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened' env: GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }} GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/2