Skip to content

Commit 7a92743

Browse files
Rename new options
1 parent 62706f3 commit 7a92743

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
with:
3939
build_script: pnpm build # Optional
4040
trigger_comment: /snapit # Default value not required
41-
package_manager: pnpm # Optional: override auto-detection
42-
shopify_registry: https://registry.npmjs.org # Optional: Shopify NPM registry URL
41+
comment_package_manager: pnpm # Optional: override auto-detection
42+
comment_shopify_registry: https://registry.npmjs.org # Optional: Shopify NPM registry URL
4343
```
4444
4545
**Deploy to branch**
@@ -69,8 +69,8 @@ jobs:
6969
with:
7070
branch: snapshot-release
7171
trigger_comment: /snapit # Default value not required
72-
package_manager: pnpm # Optional: override auto-detection
73-
shopify_registry: https://registry.npmjs.org # Optional: Shopify NPM registry URL
72+
comment_package_manager: pnpm # Optional: override auto-detection
73+
comment_shopify_registry: https://registry.npmjs.org # Optional: Shopify NPM registry URL
7474
```
7575
7676
## Environment Variables
@@ -92,13 +92,13 @@ A `NPM_TOKEN` needs to be created and added to the repository to [publish packag
9292
| `comment_suffix` | Custom message to add to the end of the release GitHub comment. |
9393
| `comment_packages` | Filter to include specific packages in the release GitHub comment. Separate multiple packages with commas. |
9494
| `comment_is_global` | If true, the generated GitHub comment will show the command to install your packages globally. Otherwise, shows a JSON example to update local dependencies. |
95+
| `comment_package_manager` | Package manager to show for global installation (`yarn`, `npm`, or `pnpm`). If not specified, auto-detects based on lock files. |
96+
| `comment_shopify_registry` | Shopify NPM registry URL (e.g. `https://registry.npmjs.org`). Will be added as `--@shopify:registry=` to global installation command. |
9597
| `cwd` | If specified, the action will run all commands for snapit in the specified directory. |
9698
| `branch` | Push the changes to a branch instead of publishing to the NPM registry. |
9799
| `post_install_script` | If specified, will run a script after dependencies are installed. |
98100
| `build_script` | The build script to run before publishing. |
99101
| `release_branch` | Default: `changeset-release/main`. If specified, will use this branch name in place of the default |
100-
| `package_manager` | Package manager to show for global installation (`yarn`, `npm`, or `pnpm`). If not specified, auto-detects based on lock files. |
101-
| `shopify_registry` | Shopify NPM registry URL (e.g. `https://registry.npmjs.org`). Will be added as `--@shopify:registry=` to global installation command. |
102102

103103
## Contributing
104104

@@ -115,8 +115,8 @@ To contribute a change, bug fix or feature to snapit:
115115

116116
**`v0.0.16`**
117117

118-
- Add `package_manager` to specify which package manager to use instead of auto-detecting
119-
- Add `shopify_registry` to specify Shopify NPM registry URL (automatically adds `--@shopify:registry=` prefix)
118+
- Add `comment_package_manager` to specify which package manager to use instead of auto-detecting
119+
- Add `comment_shopify_registry` to specify Shopify NPM registry URL (automatically adds `--@shopify:registry=` prefix)
120120

121121
**`v0.0.15`**
122122

action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ inputs:
1313
description: Which packages to include in the final output. All pacakges are still published, but only those in this list are shown in the final message. If empty, all packages are included.
1414
comment_is_global:
1515
description: If true, the generated GitHub comment will show the command to install your packages globally. Otherwise, shows a JSON example to update local dependencies.
16+
comment_package_manager:
17+
description: Package manager to show for global installation (yarn/npm/pnpm). If not specified, will auto-detect based on lock files.
18+
comment_shopify_registry:
19+
description: Shopify NPM registry URL (e.g. https://registry.npmjs.org). Will be added as --@shopify:registry= to global installation command.
1620
cwd:
1721
description: If specified, the action will run all commands for snapit in the specified directory.
1822
branch:
@@ -24,10 +28,6 @@ inputs:
2428
release_branch:
2529
description: If specified, will use this branch name in place of the default `changeset-release/main` branch.
2630
default: 'changeset-release/main'
27-
package_manager:
28-
description: Package manager to show for global installation (yarn/npm/pnpm). If not specified, will auto-detect based on lock files.
29-
shopify_registry:
30-
description: Shopify NPM registry URL (e.g. https://registry.npmjs.org). Will be added as --@shopify:registry= to global installation command.
3131

3232
runs:
3333
using: node20

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ try {
3838
const postInstallScript = core.getInput('post_install_script');
3939
const buildScript = core.getInput('build_script');
4040
const commentPackages = core.getInput('comment_packages');
41-
const specifiedPackageManager = core.getInput('package_manager');
42-
const shopifyRegistryUrl = core.getInput('shopify_registry');
41+
const commentPackageManager = core.getInput('comment_package_manager');
42+
const commentShopifyRegistry = core.getInput('comment_shopify_registry');
4343
const cwd = core.getInput('cwd');
4444
const octokit = github.getOctokit(process.env.GITHUB_TOKEN);
4545
const releaseBranch =
@@ -229,13 +229,13 @@ try {
229229
: `Your snapshot${multiple ? 's have' : ' has'} been published to npm.**\n\n`;
230230

231231
const messagePackageManager =
232-
specifiedPackageManager?.toLowerCase() ?? packageManager;
232+
commentPackageManager?.toLowerCase() ?? packageManager;
233233
let globalInstallMessage =
234234
messagePackageManager === 'yarn'
235235
? 'yarn global add'
236236
: `${messagePackageManager} i -g`;
237-
if (shopifyRegistryUrl) {
238-
globalInstallMessage = `${globalInstallMessage} --@shopify:registry=${shopifyRegistryUrl}`;
237+
if (commentShopifyRegistry) {
238+
globalInstallMessage = `${globalInstallMessage} --@shopify:registry=${commentShopifyRegistry}`;
239239
}
240240

241241
const globalPackagesMessage =

0 commit comments

Comments
 (0)