From 3693a837360973dcede381ca42e3c91ef94267a3 Mon Sep 17 00:00:00 2001 From: Marco Costa Date: Tue, 8 Dec 2020 11:50:40 -0500 Subject: [PATCH] Action: Fix milestone tagging not working for community PRs (#1278) Reference issue: https://github.com/WordPress/gutenberg/issues/17324#issuecomment-724784917 Because the GitHub Action runs on our repository, it doesn't have permission to modify a community pull request, as those belong to the original forked repository. This PR solves that by running the Action in the context of the original repository, by triggering from the `pull_request_target` event, instead of `pull_request`. --- .github/workflows/add-milestone-to-pull-requests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-milestone-to-pull-requests.yml b/.github/workflows/add-milestone-to-pull-requests.yml index 4f39d4323f3..9de983cd022 100644 --- a/.github/workflows/add-milestone-to-pull-requests.yml +++ b/.github/workflows/add-milestone-to-pull-requests.yml @@ -1,6 +1,6 @@ name: Add milestone to pull requests on: - pull_request: + pull_request_target: types: [closed] branches: - master