-
Notifications
You must be signed in to change notification settings - Fork 1
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
PR landing tool #6
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add basic --help
option.
f0c401c
to
a56cca9
Compare
20d9106
to
1c4f395
Compare
5c0e1de
to
2ec3867
Compare
git = await exec(`git log -${count} --pretty=format:%h`); | ||
} catch (error) { | ||
console.error(error); | ||
process.exit(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I'd prefer to handle these errors (here and in differCommits, currentBranch, getRepoName) at the calling site to avoid duplicate code (i.e. console.error(error); process.exit(1)
).
bin/land.js
Outdated
async function getRepoName() { | ||
let git, | ||
name = 'origin'; | ||
args.forEach(value => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (const value of args) {
if (value.startsWith('--remote-name')) {
name = value.split('=')[1];
}
}
dd91e99
to
293848c
Compare
ee88771
to
062d83a
Compare
No description provided.