From 9bbe44fb9d692047a3b35a691e85f32fbb4ae3b6 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 4 Feb 2022 22:22:01 -0800 Subject: [PATCH] github: Fix automated PR creation for backports GitHub Actions stores the token used for checking out a git repo in the git configuration and then uses that token for pushes from that repo too. We need to use a different token for push because we are pushing to the llvmbot/llvm-project repo and not the upstream repo, so we need to disable persist-credentials when checking out the source. --- .github/workflows/issue-release-workflow.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/issue-release-workflow.yml b/.github/workflows/issue-release-workflow.yml index 432f06d..318b4c2 100644 --- a/.github/workflows/issue-release-workflow.yml +++ b/.github/workflows/issue-release-workflow.yml @@ -36,6 +36,10 @@ jobs: uses: actions/checkout@v2 with: repository: llvm/llvm-project + # GitHub stores the token used for checkout and uses it for pushes + # too, but we want to use a different token for pushing, so we need + # to disable persist-credentials here. + persist-credentials: false fetch-depth: 0 - name: Setup Environment -- 2.7.4