Skip to content

Commit 4c1d51f

Browse files
committed
chore(ci): more permissions
1 parent 8aeee27 commit 4c1d51f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/release-stable.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,17 @@ function safeExec(cmd: string, opts = {}) {
131131

132132
// ---- CREATE RELEASE BRANCH + PR ----
133133
process.env.GITHUB_TOKEN = process.env.RELEASE_GITHUB_TOKEN
134-
// Remove ALL credential helpers to ensure only our token is used
134+
135+
// REMOVE ALL credential helpers and .extraheader IMMEDIATELY BEFORE PUSH
135136
try {
136137
safeExec('git config --global --unset credential.helper || true')
137138
} catch {}
138139
try {
139140
safeExec('git config --local --unset credential.helper || true')
140141
} catch {}
142+
try {
143+
safeExec('git config --local --unset http.https://github.com/.extraheader || true')
144+
} catch {}
141145

142146
// Ensure remote is set again before push
143147
if (process.env.RELEASE_GITHUB_TOKEN) {
@@ -172,6 +176,9 @@ function safeExec(cmd: string, opts = {}) {
172176
console.log('No changes to commit')
173177
}
174178

179+
// DEBUG: Show credential config and remote before push
180+
safeExec('git config --local --get http.https://github.com/.extraheader || true')
181+
175182
safeExec(`git push origin ${branchName}`)
176183

177184
// Open PR using GitHub CLI

0 commit comments

Comments
 (0)