Граф коммитов

100 Коммитов

Автор SHA1 Сообщение Дата
Mislav Marohnić 4813e859ae [docs] Clarify `--message`, `--file`, and `--edit` flags 2019-09-29 10:59:09 +02:00
Mislav Marohnić ad6e36233d [release] Clarify that `delete` doesn't remove the git tag
Ref. #2043
2019-02-20 19:05:19 +01:00
Mislav Marohnić 3625691293 [cli] Have commands with rich output respect the `--color` flag
- default: `--color=auto`
- `--color` is equivalent to `--color=always`
- `--color=never` disables color for TTYs
2019-02-18 14:21:25 +01:00
Mislav Marohnić 90523e4da6 Tweak descriptions of several commands 2019-01-21 21:54:34 +01:00
Mislav Marohnić f5df7cab9f Passing values for long-form flags is now available without `=` 2019-01-21 21:35:15 +01:00
Mislav Marohnić 3d41d7e91f Raise `UsageError()` on invalid arguments 2019-01-18 04:09:43 +01:00
Mislav Marohnić f06e506ef8 Switch `release` to new args parser 2019-01-18 03:47:50 +01:00
Mislav Marohnić c0db6e6f0c Use ArgsParser for commands that don't declare flags via pflag 2019-01-18 01:50:28 +01:00
Mislav Marohnić f275d483be Fix formatting in hub-release(1) 2018-12-29 14:33:12 +01:00
Mislav Marohnić 02989309ed Docs formatting issues 2018-12-28 17:54:15 +01:00
Mislav Marohnić f8feb335bc Don't choke on literal `%` output from `--format` use
In general, avoid using Printf without a static format string.
2018-12-20 18:01:20 +01:00
Mislav Marohnić 3e6fcc1f8a Add documentation about `%n` and `%%` tokens for `--format` 2018-12-20 17:54:49 +01:00
Mislav Marohnić 258b700914 Indicate that long-form CLI flags are used like `--message=VALUE`
The previous format of documentation made it look like `--message VALUE`
(no equal sign) would be supported, which might be misleading.
2018-12-18 17:49:09 +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ć 7467e49c90 Clarify documentation about what constitutes a title in `--message`
It's not only the first line of text; it's the entire first "block" (or
paragraph) of text with newlines turned into spaces. This is for
compatibility with git-commit(1).
2018-11-28 02:38:12 +01:00
Mislav Marohnić d5761b714b Add `--format=<FORMAT>` functionality to `issue show`, `release show` 2018-10-30 23:19:53 +01:00
Mislav Marohnić 3c8b674faa Use canonical repo for `hub release` operations
For `hub release show`, `MainProject()` was used to fetch the canonical
repo of the current project. However, the `create`, `edit`, and `delete`
operations used `CurrentProject()` most likely by mistake. This caused
the `hub release edit` operation, for example, to be potentially
performed against a fork rather than the canonical repo, depending on
the currenly checked out branch.

Fixes #1881
2018-09-27 11:51:54 +02:00
Mislav Marohnić 4c90dfd88f Fix `--attach` docs for `hub release`
[ci skip]
2018-06-14 13:55:22 +02:00
Mislav Marohnić cc1757cab5 Improve scenario when `<TAG>` was not given to `hub release` 2018-06-07 15:53:13 +02:00
Mislav Marohnić 0871816652 Add `hub release --format=<FORMAT>` option 2018-05-30 12:05:45 +02:00
Mislav Marohnić 31ab5e5147 Fix limiting number of results from `release`, `issue`
- Stops HTTP pagination once the limit has been reached
- Cleans up client implementation by passing around a filter block
2018-01-29 23:30:41 +01:00
Mislav Marohnić 420d2121ed Merge remote-tracking branch 'origin/master' into limit-flags 2018-01-29 22:54:30 +01:00
Mislav Marohnić a4274c1615 Show commented-out help text whenever an editor is opened
This shows commented-out text such as "Creating an issue for github/hub"
not only when `-m` or `-F` weren't passed, but also when they were
passed and `--edit` was used.
2018-01-23 18:08:23 +01:00
Mislav Marohnić df2e473e97 Refactor message editing and always respect `--edit`
Previously, passing `--edit` in combination with `-m` would skip opening
the editor. For compatibility with `git commit`, `--edit` is now always
respected.
2018-01-23 16:15:56 +01:00
Mislav Marohnić 7b2311e0f7 Merge remote-tracking branch 'origin/master' into commentchar-auto 2018-01-23 12:03:30 +01:00
Josh Soref 0180cb5fdb spelling: release 2017-11-08 02:48:27 +00:00
Michael Kaiser 1aedd0c59b Move filtering and limiting to client 2017-10-17 12:53:57 +02:00
Michael Kaiser d2de3094a0 Add limit flag for issue and release commands 2017-10-14 23:50:39 +02:00
Mislav Marohnić 04e43fa22f Use full text editor filename at call site for greppability 2017-07-31 17:33:41 +02:00
Mislav Marohnić 4837835d6d Refactor how commented sections are added to contents of text editor
Before, the code outside of `editor.go` was responsible for prefixing
lines of the commented section with the comment char. The code to do
this was scattered all over the codebase and was difficult to refactor
re: adding support for `commentchar=auto`.

Now, Editor has a `AddCommentedSection()` method that allows for
declarative adding of a commented section. Furthermore, the caller
doesn't have to query git to determine the comment char.
2017-07-31 17:33:41 +02:00
Mislav Marohnić 9a0c525b42 Merge pull request #1327 from wesbland/delete_release
Add ability to delete releases
2017-06-26 23:44:43 +02:00
Mislav Marohnić 629d13908f Merge branch 'no-prerelease' 2017-04-10 23:09:52 +02:00
Mislav Marohnić acc85a0aa9 Make it `release --exclude-prereleases` (plural)
This is for consistency with `--include-drafts` (also plural).
2017-04-10 23:09:11 +02:00
Wesley Bland 4f419aa4fe Add ability to delete releases
To mirror all the other `hub release` commands, allow the user to delete
releases from the command line. The new subcommand takes only one
argument (the tag of the release being deleted).

Fixes #1326
2016-11-01 15:47:15 -05: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ć 3255fce35f Rename the `--commitish` shorthand from `-c` to `-t`
This is to free up `-c` for `--copy`.
2016-09-11 03:13:23 +02:00
Mislav Marohnić 0c4689c673 Fix printing content on Windows after successful run
The old `args.After("echo", ...)` approach won't cut it on Windows since
there is no `echo` executable. Thus, nothing was printed on Windows.

Instead, expand Args type with extra functionality that allows Go
callbacks after all commands in the chain have been run.

Also, the new `args.NoForward()` is now preferred to `os.Exit()` since
it's more descriptive and allows `defer` in the calling function.
2016-09-10 23:49:58 +02:00
Mislav Marohnić d5c8337f1f Fix `release` from detached HEAD
Don't try to default `target_commitish` to the currently checked out
branch. Instead, keep the value blank unless explicitly provided. It
will default to the main branch on the server.
2016-08-21 18:10:31 +02:00
Mislav Marohnić 860c910419 Unify `-F <filename> -e` functionality between commands 2016-08-21 12:40:16 +02:00
James Armes e8a86a9587 Added release flag to exclude prereleases. 2016-06-02 13:12:41 -04:00
Glenn Pratt c57cb62ef9 Add `hub release download` command that downloads all assets. 2016-02-26 12:24:52 -06:00
Mislav Marohnić aa41494184 Document synopsis for `--include-drafts` 2016-02-02 00:16:11 +11:00
Mislav Marohnić 05a5e7c492 Handle case when editing a release just uploads new assets 2016-02-01 13:02:58 +11:00
Mislav Marohnić 2f48cd1e09 No need to show release tag name in `release show <TAG>` output
Since TAG is provided as argument, the user already knows the tag name
and there's no need to include it (rather clumsily) in the output.
2016-01-31 23:04:57 +11:00
Mislav Marohnić a4ef93bb78 Use uppercase `-F` in `hub release` for similarity with `pull-request` 2016-01-31 23:04:51 +11:00
Mislav Marohnić 705bc8bd60 Rename `<COMMIT>` to `<TARGET>` for commitish 2016-01-31 22:51:19 +11:00
Mislav Marohnić 1bb1b025fe Simplify flag handling in `hub release` commands 2016-01-31 22:45:01 +11:00
Mislav Marohnić 6eedcf1e36 Avoid `defer` in functions that do `os.Exit()` 2016-01-31 20:16:25 +11:00
Mislav Marohnić 8bcacb43d9 Add `hub release edit <TAG>` 2016-01-31 20:16:25 +11:00