Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI consistency: --native => --publish-native #1210

Merged
merged 6 commits into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions bin/cml.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ describe('command-line interface tests', () => {
"cml.js <command>
Commands:
cml.js check Manage CI checks
cml.js comment Manage comments
cml.js pr <glob path...> Manage pull requests
cml.js runner Manage self-hosted (cloud & on-premise) CI runners
cml.js tensorboard Manage tensorboard.dev connections
cml.js workflow Manage CI workflows
cml.js ci Prepare Git repository for CML operations
cml.js check Manage CI checks
cml.js comment Manage comments
cml.js pr Manage pull requests
cml.js runner Manage self-hosted (cloud & on-premise) CI runners
cml.js tensorboard Manage tensorboard.dev connections
cml.js workflow Manage CI workflows
cml.js ci Prepare Git repository for CML operations
Global Options:
--log Logging verbosity
Expand Down
21 changes: 11 additions & 10 deletions bin/cml/comment/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ exports.options = kebabcaseKeys({
description:
'Post to an existing PR/MR associated with the specified commit'
},
watch: {
casperdcl marked this conversation as resolved.
Show resolved Hide resolved
type: 'boolean',
description: 'Watch for changes and automatically update the comment'
},
triggerFile: {
type: 'string',
description: 'File used to trigger the watcher',
hidden: true
},
commitSha: {
type: 'string',
alias: 'head-sha',
Expand All @@ -31,17 +40,9 @@ exports.options = kebabcaseKeys({
default: 'https://asset.cml.dev',
description: 'Self-hosted image server URL'
},
watch: {
type: 'boolean',
description: 'Watch for changes and automatically update the comment'
},
triggerFile: {
type: 'string',
description: 'File used to trigger the watcher',
hidden: true
},
native: {
publishNative: {
type: 'boolean',
alias: 'native',
description:
"Uses driver's native capabilities to upload assets instead of CML's storage; not available on GitHub"
},
Expand Down
24 changes: 12 additions & 12 deletions bin/cml/comment/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ describe('Comment integration tests', () => {
--help Show help [boolean]

Options:
--pr Post to an existing PR/MR associated with the
specified commit [boolean]
--commit-sha, --head-sha Commit SHA linked to this comment
--pr Post to an existing PR/MR associated with the
specified commit [boolean]
--watch Watch for changes and automatically update the
comment [boolean]
--commit-sha, --head-sha Commit SHA linked to this comment
[string] [default: \\"HEAD\\"]
--publish Upload any local images found in the Markdown report
[boolean]
--publish-url Self-hosted image server URL
--publish Upload any local images found in the Markdown
report [boolean]
--publish-url Self-hosted image server URL
[string] [default: \\"https://asset.cml.dev\\"]
--watch Watch for changes and automatically update the
comment [boolean]
--native Uses driver's native capabilities to upload assets
instead of CML's storage; not available on GitHub
--publish-native, --native Uses driver's native capabilities to upload assets
instead of CML's storage; not available on GitHub
[boolean]
--rm-watermark Avoid watermark; CML needs a watermark to be able to
distinguish CML comments from others [boolean]"
--rm-watermark Avoid watermark; CML needs a watermark to be able
to distinguish CML comments from others [boolean]"
`);
});
});
2 changes: 1 addition & 1 deletion bin/cml/pr.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { options, handler } = require('./pr/create');

exports.command = 'pr <glob path...>';
exports.command = 'pr';
casperdcl marked this conversation as resolved.
Show resolved Hide resolved
exports.description = 'Manage pull requests';
exports.handler = handler;
exports.builder = (yargs) =>
Expand Down
2 changes: 1 addition & 1 deletion bin/cml/pr/create.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('CML e2e', () => {
const output = await exec(`echo none | node ./bin/cml.js pr --help`);

expect(output).toMatchInlineSnapshot(`
"cml.js pr <glob path...>
"cml.js pr
Manage pull requests
Expand Down