From fd6489e558017886aa63a83772358014ddd5322c Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Tue, 18 Feb 2020 11:14:30 +0900 Subject: [PATCH] feat: Remove warning about GITHUB_TOKEN GitHub might have started to supporting to trigger the GitHub Pages build event by GITHUB_TOKEN on public repositories. (We can already use the token on private repositories.) Be careful, there is no official announcement about this by GitHub. cf. #9 --- src/set-tokens.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/set-tokens.ts b/src/set-tokens.ts index f6fd5fb5b..ec0078112 100644 --- a/src/set-tokens.ts +++ b/src/set-tokens.ts @@ -73,10 +73,8 @@ export async function setGithubToken( core.info('[INFO] setup GITHUB_TOKEN'); const context = github.context; - const payload = github.context.payload; core.debug(`ref: ${context.ref}`); core.debug(`eventName: ${context.eventName}`); - core.debug(`private: ${payload.repository?.private}`); let isProhibitedBranch = false; const ref = context.ref; @@ -89,17 +87,11 @@ export async function setGithubToken( } } - const isPrivateRepository = payload.repository?.private; if (inps.ExternalRepository) { throw new Error( 'GITHUB_TOKEN does not support to push to an external repository' ); } - if (isPrivateRepository === false) { - core.warning( - 'GITHUB_TOKEN does not support to trigger the GitHub Pages build event on a public repository' - ); - } return `https://x-access-token:${inps.GithubToken}@github.com/${publishRepo}.git`; }