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

Release v0.3.7 #488

Merged
merged 5 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion .dependancron
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.17
2.0.18
41 changes: 41 additions & 0 deletions bin/cml-pr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env node

const print = console.log;
console.log = console.error;

const yargs = require('yargs');
const decamelize = require('decamelize-keys');

const CML = require('../src/cml');

const run = async (opts) => {
const globs = opts._.length ? opts._ : undefined;
const cml = new CML(opts);
print(await cml.pr_create({ ...opts, globs }));
};

const opts = decamelize(
yargs
.usage('Usage: $0 <path to markdown file>')
.describe('md', 'Output in markdown format [](url).')
.boolean('md')
.default('repo')
.describe(
'repo',
'Specifies the repo to be used. If not specified is extracted from the CI ENV.'
)
.default('token')
.describe(
'token',
'Personal access token to be used. If not specified in extracted from ENV repo_token.'
)
.default('driver')
.choices('driver', ['github', 'gitlab'])
.describe('driver', 'If not specify it infers it from the ENV.')
.help('h').argv
);

run(opts).catch((e) => {
console.error(e);
process.exit(1);
});
198 changes: 189 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading