list branches to merge to when done
This commit is contained in:
parent
5fc32f831a
commit
f5af510d28
@ -2,6 +2,7 @@ const Git = require("simple-git");
|
|||||||
const inquirer = require("inquirer");
|
const inquirer = require("inquirer");
|
||||||
const report = require("yurnalist");
|
const report = require("yurnalist");
|
||||||
const _ = require("lodash");
|
const _ = require("lodash");
|
||||||
|
const fp = require("lodash/fp");
|
||||||
|
|
||||||
const myGit = require("../branches");
|
const myGit = require("../branches");
|
||||||
const log = require("../log");
|
const log = require("../log");
|
||||||
@ -9,12 +10,19 @@ const log = require("../log");
|
|||||||
module.exports = async (yargs) => {
|
module.exports = async (yargs) => {
|
||||||
if (!(await myGit.isClean())) {
|
if (!(await myGit.isClean())) {
|
||||||
log.error("workspace not clean, aborting");
|
log.error("workspace not clean, aborting");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const current = await myGit.currentBranch();
|
const current = await myGit.currentBranch();
|
||||||
|
|
||||||
log.success(`W00t! marking branch '${current}' as done`);
|
log.success(`W00t! marking branch '${current}' as done\n`);
|
||||||
|
|
||||||
await Git().addConfig(`branch.${current}.mikado-done`, true);
|
await Git().addConfig(`branch.${current}.mikado-done`, true);
|
||||||
|
|
||||||
|
log.info(
|
||||||
|
"upstreams to merge with:",
|
||||||
|
await Git()
|
||||||
|
.getConfig(`branch.${current}.mikado-upstream`)
|
||||||
|
.then(fp.get("values"))
|
||||||
|
.then((x) => x.join(", "))
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user