From 6530c8fa1b3b2128fcc18495b14806bc3dd28c96 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 30 Oct 2022 20:44:54 -0400 Subject: [PATCH] Replace secrets.GITHUB_TOKEN with github.token --- cmd/gh/main.go | 2 +- pkg/cmd/auth/login/login.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/gh/main.go b/cmd/gh/main.go index 09beb5a35..abc9dd335 100644 --- a/cmd/gh/main.go +++ b/cmd/gh/main.go @@ -315,7 +315,7 @@ func authHelp() string { return heredoc.Doc(` gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable. Example: env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ github.token }} `) } diff --git a/pkg/cmd/auth/login/login.go b/pkg/cmd/auth/login/login.go index 364abb9f0..50cf111f2 100644 --- a/pkg/cmd/auth/login/login.go +++ b/pkg/cmd/auth/login/login.go @@ -63,7 +63,7 @@ func NewCmdLogin(f *cmdutil.Factory, runF func(*LoginOptions) error) *cobra.Comm This method is most suitable for "headless" use of gh such as in automation. See %[1]sgh help environment%[1]s for more info. - To use gh in GitHub Actions, add %[1]sGH_TOKEN: ${{secrets.GITHUB_TOKEN}}%[1]s to "env". + To use gh in GitHub Actions, add %[1]sGH_TOKEN: ${{ github.token }}%[1]s to "env". `, "`"), Example: heredoc.Doc(` # start interactive setup