Mislav Marohnić
858e97c596
Encapsulate `localRepo.RemoteForProject(project)` function
2018-12-28 03:54:14 +01:00
Mislav Marohnić
f98928699d
Add support for passing multiple `--message` options
...
This is for compatibility with git-commit(1)
2018-11-28 03:05:15 +01:00
Mislav Marohnić
e72178044f
Clean up obsolete editor code
2018-01-23 16:18:37 +01:00
Mislav Marohnić
e7e7814cc7
🔥 dead code
2016-09-13 13:25:01 +02:00
Mislav Marohnić
f7c1105df3
Copy to clipboard for `create`, `issue`, `pull-request`, `release`
...
Also add `--browse` functionality to `create` and `release` for parity
with `issue` and `pull-request`.
2016-09-11 18:21:23 +02:00
Mislav Marohnić
58ad61db27
Use a shared helper function to print or browse URLs
2016-09-11 04:38:13 +02:00
Mislav Marohnić
860c910419
Unify `-F <filename> -e` functionality between commands
2016-08-21 12:40:16 +02:00
Mislav Marohnić
e70b7fe1f5
Reimplement `release create` with simpleApi instead of go-octokit
2016-01-31 20:16:25 +11:00
Mislav Marohnić
c3ddec3248
Improve detecting local clone resources
...
In `hub clone NAME`, "NAME" was previously considered a local resource
if a directory of the same name existed, and the clone command was left
unchanged.
That worked for a while, but some users were surprised that they
couldn't clone their repo named "NAME", only to discover that there was
an unrelated directory "NAME" in the current working directory.
Also, a git bundle is a valid cloneable resource, but is a file and not
a directory.
This refines the detection of cloneable resources. "NAME" is considered
to be locally cloneable if one of the following is true:
- "NAME/.git" exists
- "NAME" is a bare git repo
- "NAME" is a file whose first line includes "git bundle"
2016-01-22 20:47:51 +11:00
Mislav Marohnić
9ecd84044b
Avoid using "label" field when parsing PR response
...
To obtain the owner/fork-name combo, instead of reading it from "label"
field from the PR response simply read from `Head.Ref` and
`Head.Repo.Owner.Name` instead. This is because label is meant to be
human-readable, isn't well-documented in GitHub API docs and is unclear
when it contains two components (delimited by `:`) and when it contains
only one.
2015-02-23 18:44:36 +13:00
Jingwen Owen Ou
e554ef5627
Read title and body by taking into account Windows line endings
...
`bufio.Scanner` takes care of line endings difference for different OSes. See http://golang.org/pkg/bufio/#ScanLines .
This fixes #805
2015-02-12 20:02:03 -08:00
Jingwen Owen Ou
6137851f15
Vendor dependencies by rewriting import paths
2014-11-30 09:16:57 -08:00
Mislav Marohnić
5079ae405a
Fix `hub cherry-pick` remote and GitHub notation detection
2014-07-27 18:24:34 -07:00
Jingwen Owen Ou
e4cfb5c307
Revert "Split one line message for pull request"
...
This reverts commit 418c71d407
. See
discussion https://github.com/github/hub/pull/550#issuecomment-40901808
2014-04-20 12:27:39 -07:00
Jingwen Owen Ou
418c71d407
Split one line message for pull request
...
When creating pull request with `-m` flag in the command line, "\n" appears as "\\n",
failing to split title and body. See https://github.com/jingweno/gh/issues/200#issuecomment-38517724
2014-04-19 18:19:42 -07:00
Jingwen Owen Ou
a7badc8c84
Validate git dir when getting local repo
2014-04-01 13:40:02 -07:00
Jingwen Owen Ou
408876e9bd
Use octokit/go-octokit instead of jingweno/go-octokit
2014-02-21 09:08:34 -08:00
Jingwen Owen Ou
498789a999
Change namespace to github/hub
2014-02-10 08:29:03 -08:00
Jingwen Owen Ou
0d38318113
Move GetTitleAndBodyFromFlags to commands/utils
2013-12-31 11:06:58 -08:00
David Calavera
bb4e5f2d81
Add command to create issues.
2013-12-30 20:12:19 -08:00
Jingwen Owen Ou
712a6852bb
Merge remote-tracking branch 'origin/master' into pull_in_cucumber_tests
...
Conflicts:
commands/pull_request.go
git/git.go
2013-12-28 01:31:03 -08:00
Jingwen Owen Ou
ba6363328e
Pull in cucumber tests from Hub
...
Since 31a85e519e
...master
Some tests are ignored either because they don't make sense or WIP
2013-12-28 01:14:07 -08:00
David Calavera
4f0312f35d
Move `isEmptyDir` to the command utilities.
...
Removes duplicated test helper.
2013-12-20 16:45:48 -08:00
Jingwen Owen Ou
4316c40c3d
Remote is compatible with Hub
2013-12-16 07:54:46 -08:00
Jingwen Owen Ou
e1d8199acb
Make checkout compatible with Hub
2013-12-10 22:05:26 -08:00
Jingwen Owen Ou
9d8749e1a5
Git merge is compatible with Hub spec
2013-12-10 13:42:54 -08:00
Jingwen Owen Ou
ea1fb4d263
Use the go-octokit fork
2013-12-03 11:52:10 -08:00
Jingwen Owen Ou
1025d4d79f
Fix octokit import path
2013-11-07 18:14:13 -08:00
Jingwen Owen Ou
32e57d23ba
Change pull request API to use octokit
2013-11-07 11:54:40 -08:00
Jingwen Owen Ou
1219f0efaa
Fix bug in parsing pull request response for user and branch
2013-07-29 10:50:28 -07:00
Jingwen Owen Ou
2032d4c05a
Extract duplication to hasGitRemote
2013-07-19 22:53:38 -07:00
Jingwen Owen Ou
e026fa1a83
Implement cherry-pick
2013-07-19 22:46:47 -07:00
Jingwen Owen Ou
08b7cd31a0
Rename local var
2013-07-18 15:09:15 -07:00
Jingwen Owen Ou
f0c3b28ca0
Implement gh fetch
2013-07-10 16:29:26 -07:00
Jingwen Owen Ou
83a4b6f1ac
Implement create
2013-07-09 14:36:02 -07:00
Jingwen Owen Ou
87430090a9
Enable noop
2013-07-05 11:10:24 -07:00
Jingwen Owen Ou
32f7e9a58d
Use HTMLURL
2013-07-02 12:27:42 -07:00
Jingwen Owen Ou
b521fd0dc8
Move methods to utils
2013-07-02 12:08:48 -07:00
Jingwen Owen Ou
f2ee200ba4
Implement clone
2013-07-01 10:11:02 -07:00
Jingwen Owen Ou
24eec6ccfc
Fix bugs in Args#Remove
2013-06-28 16:49:49 -07:00
Jingwen Owen Ou
c45b0dcae2
Combine Git#GitURL and Git#SshURL
2013-06-17 11:36:28 -07:00
Jingwen Owen Ou
b4c56217ee
Implement gh compare
2013-06-02 17:04:25 -07:00