From dcb9143330ab1ce962d951eb6bc512c46dfed214 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Mon, 18 Apr 2022 14:28:05 +0530 Subject: [PATCH] .github: use pull_request_target which has access to token This tries to add support for forked repo pull requests, to be able to run quality checks on it and send comments on the PR. Hopefully, this solves the issues faced recently. Due to the way pull_request_target works, I can't send this as a PR so committing directly to `main` and then sending a dummy PR from a fork to test if it works as documented by github and elsewhere. Signed-off-by: Rohit Yadav --- .github/workflows/coverage-check.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage-check.yml b/.github/workflows/coverage-check.yml index 097a49a9bae..00d1c975fa2 100644 --- a/.github/workflows/coverage-check.yml +++ b/.github/workflows/coverage-check.yml @@ -17,7 +17,7 @@ name: PR Quality Check -on: [pull_request] +on: [pull_request_target] jobs: build: @@ -25,6 +25,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + ref: "refs/pull/${{ github.event.number }}/merge" - name: Changed Java Files id: java-changes