fix: use one note reference per tag to prevent conflicts (#2085)

Co-authored-by: Matt Travi <126441+travi@users.noreply.github.com>
This commit is contained in:
Killian Hamayada
2024-01-05 14:51:59 -06:00
committed by GitHub
co-authored by Matt Travi
parent 6d2a6f1aa6
commit 020ea7d7d5
3 changed files with 48 additions and 16 deletions
+2 -2
View File
@@ -315,7 +315,7 @@ export async function rebase(ref, execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`.
*/
export async function gitAddNote(note, ref, execaOptions) {
await execa("git", ["notes", "--ref", GIT_NOTE_REF, "add", "-m", note, ref], execaOptions);
await execa("git", ["notes", "--ref", `${GIT_NOTE_REF}-${ref}`, "add", "-m", note, ref], execaOptions);
}
/**
@@ -325,5 +325,5 @@ export async function gitAddNote(note, ref, execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`.
*/
export async function gitGetNote(ref, execaOptions) {
return (await execa("git", ["notes", "--ref", GIT_NOTE_REF, "show", ref], execaOptions)).stdout;
return (await execa("git", ["notes", "--ref", `${GIT_NOTE_REF}-${ref}`, "show", ref], execaOptions)).stdout;
}