Skip to content

Commit d9bca88

Browse files
committed
Merge branch 'debug-initialize-git-notes'
2 parents 87752f0 + 3c6abc6 commit d9bca88

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

.vscode/launch.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"runtimeExecutable": null,
2121
"env": {
2222
"NODE_ENV": "development",
23-
"GITGITGADGET_DRY_RUN": "1"
23+
"GITGITGADGET_DRY_RUN": "1",
24+
"GITHUB_ACTIONS": "true",
25+
"INPUT_INITIAL-USER": "moi-meme"
2426
},
2527
"console": "integratedTerminal",
2628
"sourceMaps": true,

lib/ci-helper.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,20 @@ export class CIHelper {
189189
}
190190
const initialUser = core.getInput("initial-user");
191191
console.time("verify that Git notes do not yet exist");
192-
const existingNotes = await git(
193-
[
194-
"ls-remote",
195-
"origin",
196-
GitNotes.defaultNotesRef,
197-
"refs/notes/mail-to-commit",
198-
"refs/notes/commit-to-mail",
199-
],
200-
{
201-
workDir: this.workDir,
202-
},
203-
);
192+
const existingNotes = process.env.GITGITGADGET_DRY_RUN
193+
? ""
194+
: await git(
195+
[
196+
"ls-remote",
197+
"origin",
198+
GitNotes.defaultNotesRef,
199+
"refs/notes/mail-to-commit",
200+
"refs/notes/commit-to-mail",
201+
],
202+
{
203+
workDir: this.workDir,
204+
},
205+
);
204206
if (existingNotes !== "") {
205207
throw new Error(`Git notes already exist in ${this.workDir}:\n${existingNotes}`);
206208
}

0 commit comments

Comments
 (0)