Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from loopmediagroup/dev
[Gally]: master <- dev
- Loading branch information
Showing
17 changed files
with
241 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
const os = require("os"); | ||
const git = require("./../util/git"); | ||
const github = require("./../util/github"); | ||
const gally = require("./../gally"); | ||
const open = require("./../util/open"); | ||
const logger = require("./../util/logger"); | ||
|
||
exports.command = 'promote <branch>'; | ||
exports.command = 'promote [remote] <branch>'; | ||
exports.desc = 'Open pr URL from provided to configured "upstream" branch'; | ||
exports.builder = {}; | ||
exports.handler = argv => gally | ||
.load(`${os.homedir()}/.gally`, process.cwd()) | ||
.then(config => git.ghPromoteUrl(config, argv.branch).then(open.url)); | ||
.then(config => github.promoteBranch(config, argv.remote, argv.branch)) | ||
.then(logger.info); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const request = require("./../github/request"); | ||
|
||
const create = (source, target, repoKey, token) => request.post( | ||
`https://api.github.com/repos/${repoKey}/pulls`, | ||
token, | ||
{ | ||
body: { | ||
title: `[Gally]: ${target} <- ${source}`, | ||
head: source, | ||
base: target, | ||
maintainer_can_modify: false, | ||
body: "Automatically created by Git-Ally" | ||
} | ||
} | ||
); | ||
module.exports.create = create; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.