From c9062785d7d03eb87ad99a66ccaec2333095cc33 Mon Sep 17 00:00:00 2001 From: Jacob Hummer Date: Tue, 14 Nov 2023 16:13:10 -0600 Subject: [PATCH] try this --- README.md | 4 ++-- action.yml | 7 +++---- src/main.ts | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2b05ffd..4ca09ba 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,8 @@ are welcome! ❤️ - **`github-token`:** GitHub token to use for authentication when pulling and pushing to the GitHub instance defined by `github-server-url`. By default this - uses `github.token`. Change this to a personal access token if you intend to - do things that go beyond the scope of the current repository. + is unset. You can set this to `github.token` or a personal access token if you + want to configure GitHub authentication globally. - **`github-server-url`:** Server URL like `https://github.example.org` to use as the scope for the `github-token`. By default this uses `github.server_url` diff --git a/action.yml b/action.yml index 50d103f..be0d89b 100644 --- a/action.yml +++ b/action.yml @@ -9,10 +9,9 @@ inputs: github-token: description: > GitHub token to use for authentication when pulling and pushing to the - GitHub instance defined by 'github-server-url'. By default this uses - 'github.token'. Change this to a personal access token if you intend to do - things that go beyond the scope of the current repository. - default: ${{ github.token }} + GitHub instance defined by 'github-server-url'. By default this is unset. + You can set this to 'github.token' or a personal access token if you want + to configure GitHub authentication globally. github-server-url: description: > Server URL like 'https://github.example.org' to use as the scope for the diff --git a/src/main.ts b/src/main.ts index aa3e67c..01ed9e9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -60,7 +60,7 @@ if (userName && userEmail) { await $({ stdio: "inherit" })`git config --global user.email ${userEmail}`; } -if (githubToken && githubServerURL) { +if (githubToken) { const prefix = new URL(githubServerURL).origin + "/"; const basicAuth = Buffer.from( `x-access-token:${githubToken}`,