Skip to content

Commit 18b4714

Browse files
Don't set GITHUB_TOKEN (#2089)
This needs to be explicitly in the `env` to be consistent with GitHub Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 610358e commit 18b4714

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

pkg/runner/run_context.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,6 @@ func (rc *RunContext) withGithubEnv(ctx context.Context, github *model.GithubCon
911911
env["GITHUB_REF"] = github.Ref
912912
env["GITHUB_REF_NAME"] = github.RefName
913913
env["GITHUB_REF_TYPE"] = github.RefType
914-
env["GITHUB_TOKEN"] = github.Token
915914
env["GITHUB_JOB"] = github.Job
916915
env["GITHUB_REPOSITORY_OWNER"] = github.RepositoryOwner
917916
env["GITHUB_RETENTION_DAYS"] = github.RetentionDays

pkg/runner/step_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ func TestSetupEnv(t *testing.T) {
182182
"GITHUB_RUN_ID": "runId",
183183
"GITHUB_RUN_NUMBER": "1",
184184
"GITHUB_SERVER_URL": "https://",
185-
"GITHUB_TOKEN": "",
186185
"GITHUB_WORKFLOW": "",
187186
"INPUT_STEP_WITH": "with-value",
188187
"RC_KEY": "rcvalue",

0 commit comments

Comments
 (0)