From 7f1de6ddcfd03c3f5136af8a9c9ba7ec5b5929e6 Mon Sep 17 00:00:00 2001 From: Jon Jensen Date: Sat, 11 Nov 2023 13:37:41 -0700 Subject: [PATCH] Don't set GITHUB_TOKEN This needs to be explicitly in the `env` to be consistent with GitHub --- pkg/runner/run_context.go | 1 - pkg/runner/step_test.go | 1 - 2 files changed, 2 deletions(-) diff --git a/pkg/runner/run_context.go b/pkg/runner/run_context.go index 70d2f8f489d..070b515c1f8 100644 --- a/pkg/runner/run_context.go +++ b/pkg/runner/run_context.go @@ -907,7 +907,6 @@ func (rc *RunContext) withGithubEnv(ctx context.Context, github *model.GithubCon env["GITHUB_REF"] = github.Ref env["GITHUB_REF_NAME"] = github.RefName env["GITHUB_REF_TYPE"] = github.RefType - env["GITHUB_TOKEN"] = github.Token env["GITHUB_JOB"] = github.Job env["GITHUB_REPOSITORY_OWNER"] = github.RepositoryOwner env["GITHUB_RETENTION_DAYS"] = github.RetentionDays diff --git a/pkg/runner/step_test.go b/pkg/runner/step_test.go index d08a1297531..cdb870e29ae 100644 --- a/pkg/runner/step_test.go +++ b/pkg/runner/step_test.go @@ -182,7 +182,6 @@ func TestSetupEnv(t *testing.T) { "GITHUB_RUN_ID": "runId", "GITHUB_RUN_NUMBER": "1", "GITHUB_SERVER_URL": "https://", - "GITHUB_TOKEN": "", "GITHUB_WORKFLOW": "", "INPUT_STEP_WITH": "with-value", "RC_KEY": "rcvalue",