From c8030d0c675a3277cd235154a51f8e3887bc07a9 Mon Sep 17 00:00:00 2001 From: Marco Costa Date: Mon, 7 Dec 2020 11:43:38 -0500 Subject: [PATCH] Action: Fix milestone tagging not working for community PRs 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