We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66425a1 commit 6d66f48Copy full SHA for 6d66f48
1 file changed
scripts/release/module-automation/commons.js
@@ -204,7 +204,11 @@ async function githubAuthentication(moduleInfo) {
204
""
205
)}`
206
);
207
- await execShellCommand(`echo "${process.env.GH_PAT}" | gh auth login --with-token`);
+ // If GH_TOKEN or GITHUB_TOKEN is set, gh CLI uses it automatically - no login needed
208
+ // Otherwise, authenticate using GH_PAT
209
+ if (!process.env.GH_TOKEN && !process.env.GITHUB_TOKEN) {
210
+ await execShellCommand(`echo "${process.env.GH_PAT}" | gh auth login --with-token`);
211
+ }
212
}
213
214
async function cloneRepo(githubUrl, localFolder, branchName = "main") {
0 commit comments