Compare commits

...

46 Commits

Author SHA1 Message Date
aa666d7acf lib/get-config.js aktualisiert 2024-02-06 20:49:24 +00:00
renovate[bot]
28bcc1d54b
chore(deps): update dependency prettier to v3.2.5 (#3177)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-06 17:41:14 +00:00
renovate[bot]
9faded8d50
fix(deps): update dependency marked-terminal to v7
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-06 09:37:02 -08:00
renovate[bot]
fccab39b87
chore(deps): lock file maintenance (#3179)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 01:23:19 +00:00
renovate[bot]
6be228070f
chore(deps): update dependency got to v14.2.0 (#3175)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-03 13:53:59 +00:00
renovate[bot]
518b47d030
chore(deps): update dependency npm-run-all2 to v6.1.2 (#3171)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-02 23:06:08 +00:00
renovate[bot]
c6c01aa1ae
ci(action): update github/codeql-action action to v3.24.0 (#3173)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-02 22:30:01 +00:00
renovate[bot]
ee4f99f0cf
chore(deps): update dependency ava to v6.1.1 (#3168)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-30 05:15:45 +00:00
renovate[bot]
9b9c9b76c3
chore(deps): update dependency got to v14.1.0 (#3167)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-29 14:53:22 +00:00
Matt Travi
211704d102
Merge pull request #3166 from knownasnaffy/patch-1
Docs: fix typo in JS API guide
2024-01-29 08:50:14 -06:00
Barinderpreet Singh
01779f4efa
docs: fix typo in JS API guide 2024-01-29 19:57:56 +05:30
renovate[bot]
95ea5ef9b7
chore(deps): lock file maintenance (#3165)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-29 03:53:31 +00:00
renovate[bot]
2fd9685bff
chore(deps): update dependency nock to v13.5.1 (#3164)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-28 21:18:00 +00:00
renovate[bot]
c85cde96f2
ci(action): update github/codeql-action action to v3.23.2 (#3161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-26 16:35:46 +00:00
renovate[bot]
ac5fdeaf05
chore(deps): lock file maintenance (#3155)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-24 01:10:53 +00:00
renovate[bot]
4044e7a932
ci(action): update github/codeql-action action to v3.23.1 (#3149)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-23 23:09:00 +00:00
renovate[bot]
440d0661eb
ci(action): update actions/upload-artifact action to v4.3.0 (#3156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-23 18:35:58 +00:00
renovate[bot]
6e57047eca
ci(action): update actions/upload-artifact action to v4.2.0 (#3151)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-22 00:24:38 +00:00
renovate[bot]
58b338bc9b
chore(deps): update dependency ava to v6.1.0 (#3154)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-21 22:46:36 +00:00
renovate[bot]
4692834087
chore(deps): update dependency prettier to v3.2.4 (#3147)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-17 10:53:25 +00:00
renovate[bot]
2c04f32744
chore(deps): lock file maintenance (#3143)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-15 05:53:20 +00:00
renovate[bot]
c5071df260
chore(deps): update dependency c8 to v9.1.0 (#3139)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-14 22:27:03 +00:00
renovate[bot]
2096d44b0c
chore(deps): update dependency nock to v13.5.0 (#3142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-14 20:15:58 +00:00
renovate[bot]
2c0b371f7b
chore(deps): update dependency prettier to v3.2.2 (#3140)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-14 05:22:19 +00:00
renovate[bot]
a2de1057b7
ci(action): update actions/upload-artifact action to v4.1.0 (#3141)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-12 22:00:16 +00:00
Matt Travi
58e21774cb
next major (#3111) 2024-01-12 15:55:05 -06:00
Matt Travi
8066b7fd54
Merge branch 'master' of github.com:semantic-release/semantic-release into beta 2024-01-12 13:21:47 -06:00
renovate[bot]
f31d43c429
ci(action): update github/codeql-action action to v3.23.0 (#3136)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-08 17:34:06 +00:00
renovate[bot]
13f980149a
chore(deps): lock file maintenance (#3134)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-08 01:54:31 +00:00
Killian Hamayada
020ea7d7d5
fix: use one note reference per tag to prevent conflicts (#2085)
Co-authored-by: Matt Travi <126441+travi@users.noreply.github.com>
2024-01-05 14:51:59 -06:00
renovate[bot]
6d2a6f1aa6
fix(deps): update dependency marked to v11 (#3079)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Travi <programmer@travi.org>
2024-01-05 14:27:04 -06:00
Matt Travi
ce580be16d
Merge branch 'master' into beta 2024-01-05 13:48:05 -06:00
renovate[bot]
d4b7c9a23d
chore(deps): update dependency c8 to v9 (#3128)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-05 19:47:05 +00:00
Matt Travi
7983c57300
ci(renovate): fixed reference to the org-level config 2024-01-01 15:06:05 -06:00
renovate[bot]
50ad70f229
chore(deps): lock file maintenance (#3126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 06:18:39 +00:00
renovate[bot]
90513bbc0a
chore(deps): update dependency publint to v0.2.7 (#3122)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 04:53:48 +00:00
renovate[bot]
b07ddfaaf9
chore(deps): update dependency dockerode to v4.0.2 (#3124)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 02:10:29 +00:00
renovate[bot]
acd6f05dad
ci(action): update github/codeql-action action to v3.22.12 (#3120)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-25 16:13:16 +00:00
renovate[bot]
5a7fa82309
chore(deps): update dependency dockerode to v4.0.1 (#3121)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-25 03:38:41 +00:00
renovate[bot]
81346ff687
chore(deps): lock file maintenance (#3123)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-25 01:45:52 +00:00
renovate[bot]
a8e0d6d611
chore(deps): update dependency p-retry to v6.2.0 (#3118)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-20 21:33:41 +00:00
Matt Travi
afc7518c50
docs: fixed links
fixes #3114
2023-12-18 22:11:31 -06:00
renovate[bot]
ee110291b2
ci(action): update actions/upload-artifact action to v4 (#3109)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-18 15:58:43 +00:00
renovate[bot]
f021f25ad2
ci(action): update actions/setup-node action to v4.0.1 (#3116)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-18 12:24:28 +00:00
renovate[bot]
fd2c179131
chore(deps): lock file maintenance (#3115)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-18 00:37:23 +00:00
Matt Travi
ad8f5b2608
docs(node-versions): updated the minimum documented node version in the node requirement doc
relates to https://github.com/semantic-release/semantic-release/issues/3106
2023-12-16 22:32:03 -06:00
12 changed files with 724 additions and 953 deletions

View File

@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with: with:
cache: npm cache: npm
node-version: lts/* node-version: lts/*

View File

@ -25,12 +25,12 @@ jobs:
results_format: sarif results_format: sarif
publish_results: true publish_results: true
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with: with:
name: SARIF file name: SARIF file
path: results.sarif path: results.sarif
retention-days: 5 retention-days: 5
- name: Upload to code-scanning - name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@b374143c1149a9115d881581d29b8390bbcbb59c # v3.22.11 uses: github/codeql-action/upload-sarif@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0
with: with:
sarif_file: results.sarif sarif_file: results.sarif

View File

@ -37,7 +37,7 @@ jobs:
- run: git config --global user.name github-actions - run: git config --global user.name github-actions
- run: git config --global user.email github-actions@github.com - run: git config --global user.email github-actions@github.com
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: npm cache: npm
@ -55,7 +55,7 @@ jobs:
- run: git config --global user.name github-actions - run: git config --global user.name github-actions
- run: git config --global user.email github-actions@github.com - run: git config --global user.email github-actions@github.com
- name: Use Node.js from .nvmrc - name: Use Node.js from .nvmrc
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with: with:
node-version-file: .nvmrc node-version-file: .nvmrc
cache: npm cache: npm

View File

@ -110,9 +110,9 @@ In order to use **semantic-release** you need:
## Documentation ## Documentation
- Usage - Usage
- [Getting started](docs/usage/getting-started.md#getting-started) - [Getting started](docs/usage/getting-started.md)
- [Installation](docs/usage/installation.md#installation) - [Installation](docs/usage/installation.md)
- [CI Configuration](docs/usage/ci-configuration.md#ci-configuration) - [CI Configuration](docs/usage/ci-configuration.md)
- [Configuration](docs/usage/configuration.md#configuration) - [Configuration](docs/usage/configuration.md#configuration)
- [Plugins](docs/usage/plugins.md) - [Plugins](docs/usage/plugins.md)
- [Workflow configuration](docs/usage/workflow-configuration.md) - [Workflow configuration](docs/usage/workflow-configuration.md)

View File

@ -127,7 +127,7 @@ It allows to configure **semantic-release** to write errors to a specific stream
Type: `Object` `Boolean`<br> Type: `Object` `Boolean`<br>
And object with [`lastRelease`](#lastrelease), [`nextRelease`](#nextrelease), [`commits`](#commits) and [`releases`](#releases) if a release is published or `false` if no release was published. An object with [`lastRelease`](#lastrelease), [`nextRelease`](#nextrelease), [`commits`](#commits) and [`releases`](#releases) if a release is published or `false` if no release was published.
#### lastRelease #### lastRelease
@ -159,7 +159,7 @@ Example:
Type: `Array<Object>` Type: `Array<Object>`
The list of commit included in the new release.<br> The list of commit(s) included in the new release.<br>
Each commit object has the following properties: Each commit object has the following properties:
| Name | Type | Description | | Name | Type | Description |

View File

@ -1,6 +1,6 @@
# Node version requirement # Node version requirement
**semantic-release** is written using the latest [ECMAScript 2017](https://www.ecma-international.org/publications/standards/Ecma-262.htm) features, without transpilation which **requires Node version 18.0.0 or higher**. **semantic-release** is written using the latest [ECMAScript 2017](https://www.ecma-international.org/publications/standards/Ecma-262.htm) features, without transpilation which **requires Node version 20.8.1 or higher**.
**semantic-release** is meant to be used in a CI environment as a development support tool, not as a production dependency. **semantic-release** is meant to be used in a CI environment as a development support tool, not as a production dependency.
Therefore, the only constraint is to run the `semantic-release` in a CI environment providing version of Node that meets our version requirement. Therefore, the only constraint is to run the `semantic-release` in a CI environment providing version of Node that meets our version requirement.

View File

@ -123,12 +123,15 @@ async function run(context, plugins) {
if (options.dryRun) { if (options.dryRun) {
logger.warn(`Skip ${nextRelease.gitTag} tag creation in dry-run mode`); logger.warn(`Skip ${nextRelease.gitTag} tag creation in dry-run mode`);
} else { } else {
await addNote({ channels: [...currentRelease.channels, nextRelease.channel] }, nextRelease.gitHead, { await addNote({ channels: [...currentRelease.channels, nextRelease.channel] }, nextRelease.gitTag, {
cwd, cwd,
env, env,
}); });
await push(options.repositoryUrl, { cwd, env }); await push(options.repositoryUrl, { cwd, env });
await pushNotes(options.repositoryUrl, { cwd, env }); await pushNotes(options.repositoryUrl, nextRelease.gitTag, {
cwd,
env,
});
logger.success( logger.success(
`Add ${nextRelease.channel ? `channel ${nextRelease.channel}` : "default channel"} to tag ${ `Add ${nextRelease.channel ? `channel ${nextRelease.channel}` : "default channel"} to tag ${
nextRelease.gitTag nextRelease.gitTag
@ -203,9 +206,9 @@ async function run(context, plugins) {
} else { } else {
// Create the tag before calling the publish plugins as some require the tag to exists // Create the tag before calling the publish plugins as some require the tag to exists
await tag(nextRelease.gitTag, nextRelease.gitHead, { cwd, env }); await tag(nextRelease.gitTag, nextRelease.gitHead, { cwd, env });
await addNote({ channels: [nextRelease.channel] }, nextRelease.gitHead, { cwd, env }); await addNote({ channels: [nextRelease.channel] }, nextRelease.gitTag, { cwd, env });
await push(options.repositoryUrl, { cwd, env }); await push(options.repositoryUrl, { cwd, env });
await pushNotes(options.repositoryUrl, { cwd, env }); await pushNotes(options.repositoryUrl, nextRelease.gitTag, { cwd, env });
logger.success(`Created tag ${nextRelease.gitTag}`); logger.success(`Created tag ${nextRelease.gitTag}`);
} }

View File

@ -74,8 +74,8 @@ export default async (context, cliOptions) => {
plugins: [ plugins: [
"@semantic-release/commit-analyzer", "@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator", "@semantic-release/release-notes-generator",
"@semantic-release/npm", //"@semantic-release/npm",
"@semantic-release/github", //"@semantic-release/github",
], ],
// Remove `null` and `undefined` options, so they can be replaced with default ones // Remove `null` and `undefined` options, so they can be replaced with default ones
...pickBy(options, (option) => !isNil(option)), ...pickBy(options, (option) => !isNil(option)),

View File

@ -2,6 +2,7 @@ import gitLogParser from "git-log-parser";
import getStream from "get-stream"; import getStream from "get-stream";
import { execa } from "execa"; import { execa } from "execa";
import debugGit from "debug"; import debugGit from "debug";
import { merge } from "lodash-es";
import { GIT_NOTE_REF } from "./definitions/constants.js"; import { GIT_NOTE_REF } from "./definitions/constants.js";
const debug = debugGit("semantic-release:git"); const debug = debugGit("semantic-release:git");
@ -141,13 +142,9 @@ export async function fetch(repositoryUrl, branch, ciBranch, execaOptions) {
*/ */
export async function fetchNotes(repositoryUrl, execaOptions) { export async function fetchNotes(repositoryUrl, execaOptions) {
try { try {
await execa( await execa("git", ["fetch", "--unshallow", repositoryUrl, `+refs/notes/*:refs/notes/*`], execaOptions);
"git",
["fetch", "--unshallow", repositoryUrl, `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`],
execaOptions
);
} catch { } catch {
await execa("git", ["fetch", repositoryUrl, `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`], { await execa("git", ["fetch", repositoryUrl, `+refs/notes/*:refs/notes/*`], {
...execaOptions, ...execaOptions,
reject: false, reject: false,
}); });
@ -246,8 +243,8 @@ export async function push(repositoryUrl, execaOptions) {
* *
* @throws {Error} if the push failed. * @throws {Error} if the push failed.
*/ */
export async function pushNotes(repositoryUrl, execaOptions) { export async function pushNotes(repositoryUrl, ref, execaOptions) {
await execa("git", ["push", repositoryUrl, `refs/notes/${GIT_NOTE_REF}`], execaOptions); await execa("git", ["push", repositoryUrl, `refs/notes/${GIT_NOTE_REF}-${ref}`], execaOptions);
} }
/** /**
@ -307,8 +304,26 @@ export async function isBranchUpToDate(repositoryUrl, branch, execaOptions) {
* @return {Object} the parsed JSON note if there is one, an empty object otherwise. * @return {Object} the parsed JSON note if there is one, an empty object otherwise.
*/ */
export async function getNote(ref, execaOptions) { export async function getNote(ref, execaOptions) {
const handleError = (error) => {
if (error.exitCode === 1) {
return { stdout: "{}" };
}
debug(error);
throw error;
};
try { try {
return JSON.parse((await execa("git", ["notes", "--ref", GIT_NOTE_REF, "show", ref], execaOptions)).stdout); return merge(
JSON.parse(
// Used for retro-compatibility
(await execa("git", ["notes", "--ref", GIT_NOTE_REF, "show", ref], execaOptions).catch(handleError)).stdout
),
JSON.parse(
(await execa("git", ["notes", "--ref", `${GIT_NOTE_REF}-${ref}`, "show", ref], execaOptions).catch(handleError))
.stdout
)
);
} catch (error) { } catch (error) {
if (error.exitCode === 1) { if (error.exitCode === 1) {
return {}; return {};
@ -327,5 +342,19 @@ export async function getNote(ref, execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`. * @param {Object} [execaOpts] Options to pass to `execa`.
*/ */
export async function addNote(note, ref, execaOptions) { export async function addNote(note, ref, execaOptions) {
await execa("git", ["notes", "--ref", GIT_NOTE_REF, "add", "-f", "-m", JSON.stringify(note), ref], execaOptions); await execa(
"git",
["notes", "--ref", `${GIT_NOTE_REF}-${ref}`, "add", "-f", "-m", JSON.stringify(note), ref],
execaOptions
);
}
/**
* Get the reference of a tag
*
* @param {String} tag The tag name to get the reference of.
* @param {Object} [execaOpts] Options to pass to `execa`.
**/
export async function getTagRef(tag, execaOptions) {
return (await execa("git", ["show-ref", tag, "--hash"], execaOptions)).stdout;
} }

1563
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -45,8 +45,8 @@
"hosted-git-info": "^7.0.0", "hosted-git-info": "^7.0.0",
"import-from-esm": "^1.3.1", "import-from-esm": "^1.3.1",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"marked": "^9.0.0", "marked": "^11.0.0",
"marked-terminal": "^6.0.0", "marked-terminal": "^7.0.0",
"micromatch": "^4.0.2", "micromatch": "^4.0.2",
"p-each-series": "^3.0.0", "p-each-series": "^3.0.0",
"p-reduce": "^3.0.0", "p-reduce": "^3.0.0",
@ -58,24 +58,24 @@
"yargs": "^17.5.1" "yargs": "^17.5.1"
}, },
"devDependencies": { "devDependencies": {
"ava": "6.0.1", "ava": "6.1.1",
"c8": "8.0.1", "c8": "9.1.0",
"clear-module": "4.1.2", "clear-module": "4.1.2",
"codecov": "3.8.3", "codecov": "3.8.3",
"cz-conventional-changelog": "3.3.0", "cz-conventional-changelog": "3.3.0",
"dockerode": "4.0.0", "dockerode": "4.0.2",
"file-url": "4.0.0", "file-url": "4.0.0",
"fs-extra": "11.2.0", "fs-extra": "11.2.0",
"got": "14.0.0", "got": "14.2.0",
"js-yaml": "4.1.0", "js-yaml": "4.1.0",
"lockfile-lint": "4.12.1", "lockfile-lint": "4.12.1",
"ls-engines": "0.9.1", "ls-engines": "0.9.1",
"mockserver-client": "5.15.0", "mockserver-client": "5.15.0",
"nock": "13.4.0", "nock": "13.5.1",
"npm-run-all2": "6.1.1", "npm-run-all2": "6.1.2",
"p-retry": "6.1.0", "p-retry": "6.2.0",
"prettier": "3.1.1", "prettier": "3.2.5",
"publint": "0.2.6", "publint": "0.2.7",
"sinon": "17.0.1", "sinon": "17.0.1",
"stream-buffers": "3.0.2", "stream-buffers": "3.0.2",
"tempy": "3.1.0", "tempy": "3.1.0",
@ -159,7 +159,7 @@
}, },
"renovate": { "renovate": {
"extends": [ "extends": [
"github>semantic-release/.github" "github>semantic-release/.github:renovate-config"
] ]
} }
} }

View File

@ -315,7 +315,7 @@ export async function rebase(ref, execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`. * @param {Object} [execaOpts] Options to pass to `execa`.
*/ */
export async function gitAddNote(note, ref, execaOptions) { 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`. * @param {Object} [execaOpts] Options to pass to `execa`.
*/ */
export async function gitGetNote(ref, execaOptions) { 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;
} }