Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/iterative/cml into runner…
Browse files Browse the repository at this point in the history
…-no-special-cases
  • Loading branch information
DavidGOrtega committed Jun 2, 2022
2 parents f9cade3 + 8d3a574 commit d381dce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bin/cml/pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ exports.builder = (yargs) =>
type: 'boolean',
description: 'Output in markdown format [](url).'
},
skipCI: {
type: 'boolean',
description: 'Force skip CI for the created commit (if any)'
},
merge: {
type: 'boolean',
alias: 'auto-merge',
Expand Down
1 change: 1 addition & 0 deletions bin/cml/pr.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ describe('CML e2e', () => {
--log Maximum log level
[string] [choices: \\"error\\", \\"warn\\", \\"info\\", \\"debug\\"] [default: \\"info\\"]
--md Output in markdown format [](url). [boolean]
--skip-ci Force skip CI for the created commit (if any) [boolean]
--merge, --auto-merge Try to merge the pull request upon creation. [boolean]
--rebase Try to rebase-merge the pull request upon creation.
[boolean]
Expand Down
3 changes: 2 additions & 1 deletion src/cml.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ class CML {
remote = GIT_REMOTE,
globs = ['dvc.lock', '.gitignore'],
md,
skipCI,
merge,
rebase,
squash
Expand Down Expand Up @@ -412,7 +413,7 @@ class CML {
await exec(`git checkout -b ${source}`);
await exec(`git add ${paths.join(' ')}`);
let commitMessage = `CML PR for ${shaShort}`;
if (!(merge || rebase || squash)) {
if (skipCI || !(merge || rebase || squash)) {
commitMessage += ' [skip ci]';
}
await exec(`git commit -m "${commitMessage}"`);
Expand Down

1 comment on commit d381dce

@github-actions

This comment was marked as outdated.

Please sign in to comment.