From 40e70b8f7b4f2b5c96d75987c33edeb013cb81ab Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Wed, 1 Jul 2020 09:42:27 +0900 Subject: [PATCH] Update documentation --- docs/concepts-guidelines.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/concepts-guidelines.md b/docs/concepts-guidelines.md index 053bc8f..acdd073 100644 --- a/docs/concepts-guidelines.md +++ b/docs/concepts-guidelines.md @@ -208,15 +208,17 @@ It will use their own fork to push code and create the pull request. 3. Create a [Personal Access Token (PAT)](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). 4. Logout and log back in to your main user account. 5. Add a secret to your repository containing the above PAT. -6. As shown in the following example workflow, switch the git remote to the fork's URL after checkout and set the action input `request-to-parent` to `true`. +6. As shown in the following example workflow, switch the git remote to the fork's URL after checkout and update the fork to match the checked out branch. Then set the action input `request-to-parent` to `true`. ```yaml - uses: actions/checkout@v2 + with: + persist-credentials: false - run: | - git config user.password ${{ secrets.MACHINE_USER_PAT }} - git remote set-url origin https://github.com/machine-user/fork-of-repository + git remote set-url origin https://${{ secrets.MACHINE_USER_PAT }}:x-oauth-basic@github.com/machine-user/fork-of-repository git fetch --unshallow -p origin + git push --force # Make changes to pull request here