Skip to content

Commit 76f6eb2

Browse files
authored
chore(docs): include --commentWithSha option in example workflows (#503)
1 parent 0926d63 commit 76f6eb2

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,28 @@ With `--comment=create`, each commit would generate a comment for itself, useful
206206

207207
And `--comment=off` would turn off comments for maintainers who prefer minimal pull requests.
208208

209-
> `--commentWithSha` specify whether to replace the pr number with sha commit in the generated comments.
209+
> `--commentWithSha` specifies whether to replace the PR number with the commit SHA in the generated comments.
210210
211211
With `--commentWithSha`:
212212

213+
```sh
214+
pnpm exec pkg-pr-new publish --commentWithSha
215+
```
216+
217+
Generated comments use commit SHA URLs:
218+
213219
```sh
214220
npm i https://pkg.pr.new/tinybench@a832a55
215221
```
216222

217223
Without `--commentWithSha`:
218224

225+
```sh
226+
pnpm exec pkg-pr-new publish
227+
```
228+
229+
Generated comments use PR number URLs:
230+
219231
```sh
220232
npm i https://pkg.pr.new/tinybench@123
221233
```
@@ -274,7 +286,7 @@ jobs:
274286
- name: Build
275287
run: pnpm build
276288

277-
- run: pnpm exec pkg-pr-new publish
289+
- run: pnpm exec pkg-pr-new publish --commentWithSha
278290
```
279291
280292
#### Release approved pull requests only:
@@ -321,7 +333,7 @@ jobs:
321333
- name: Install dependencies
322334
run: pnpm install
323335

324-
- run: pnpm exec pkg-pr-new publish
336+
- run: pnpm exec pkg-pr-new publish --commentWithSha
325337
```
326338
327339
> Releasing approved pull requests is the recommended way of having continuous releases. This ensures users always install approved and safe packages.
@@ -382,7 +394,7 @@ jobs:
382394
run: pnpm build
383395
384396
- id: publish
385-
run: pnpm exec pkg-pr-new publish
397+
run: pnpm exec pkg-pr-new publish --commentWithSha
386398
387399
e2e-test:
388400
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)