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

52 Коммитов

Автор SHA1 Сообщение Дата
Pierre Grimaud 2836fb90da Fix typos 2020-04-26 00:21:34 +02:00
Mislav Marohnić f988235f74 Allow updating issue state 2020-01-21 12:48:56 +01:00
Mislav Marohnić b0db79dbf3 Allow nulifying existing issue's labels, assignees, & milestone 2020-01-21 12:42:55 +01:00
Mislav Marohnić c175488aa8 Avoid fetching issue unless necessary 2020-01-21 12:34:55 +01:00
Mislav Marohnić d6a74bfb1e Remove URL output from successful `issue update`
This made sense for `issue create`, where a person would want to obtain
the URL to the new issue, but it makes less sense for `issue update`,
where the user already knows the issue number (which will not change).

This makes it so that the successful run has no output, but since I
don't know what a better confirmation behavior would be, I think this is
fine for now.
2020-01-21 11:46:43 +01:00
Julian Fahrer ab374d9860 Fail when running issue update without specifying fields to update 2020-01-19 10:03:48 -08:00
Julian Fahrer 5df6b31923 Use `update` instead of `edit` to update issues 2020-01-18 16:52:30 -08:00
Julian Fahrer ae70177ac9 Extract applying common params into functions 2020-01-06 11:42:43 -08:00
Julian Fahrer fc2b4461ed Add the ability to edit issues 2020-01-03 18:37:34 -08:00
Mislav Marohnić e5cc8207cd [issue] Support passing either milestone name or number 2019-06-14 02:46:29 +02:00
Mislav Marohnić d78097d2b1 [issue] Fix `--format %L` output in no-color mode 2019-03-29 00:28:44 +01:00
Mislav Marohnić 22fc159d0b Fix `issue create --assign LIST` and documentation 2019-01-18 05:13:19 +01:00
Mislav Marohnić ee31304ba7 Switch `issue` to new args parser 2019-01-18 04:09:43 +01:00
Mislav Marohnić 16ff60ec65 Fix alphabetical sort of `hub issue labels` output
The API result isn't guaranteed to be sorted case-insensitive, so we
perform the sort in memory before displaying.
2019-01-03 04:43:25 +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ć d5761b714b Add `--format=<FORMAT>` functionality to `issue show`, `release show` 2018-10-30 23:19:53 +01:00
Mislav Marohnić 5285804c41 Code style 2018-10-30 23:19:53 +01:00
royels 6b5997f974 Add the command `hub issue view <NUMBER>`
This commit adds the subcommand hub issue view, which displays an issue as well as
lists its comments underneath.
2018-10-30 23:19:53 +01:00
Mislav Marohnić b15d8de5e4 Ensure consistent sort direction when listing issues, PRs
The default direction when sorting by `created` date (the default) is
descending. However, the default on the API backend changes to ascending
when the sort key is something different than `created`:
https://developer.github.com/v3/pulls/#list-pull-requests

This ensures that the default `direction: "desc"` is always passed to
API queries, regardless of the sort key, unless `--sort-ascending` was used.

Ref. https://github.com/github/hub/issues/1815#issuecomment-433222344
2018-10-26 14:37:47 +02:00
Mislav Marohnić 5e2d072a9a Handle case of `.github/ISSUE_TEMPLATE` directory
Ignore the directory of multiple issue templates for now. In the future,
there might be a way to pick a specific template from the list; this
change is just to prevent crashes.

Fixes #1822
2018-08-23 15:38:34 +02:00
Darren Wee d7906101aa Fix oopsie in test case.
Forgot to change expected result after changing labels functionality.
2018-01-31 00:40:32 +08:00
Darren Wee 15d3ac848e Fix oopsie (added extra newline by accident) 2018-01-30 19:45:04 +08:00
Darren Wee 8edd49eaaf Fix expected test case (pre-colorization) 2018-01-30 19:39:15 +08:00
Darren Wee 672dcc9b05 Merge label.feature into issue.feature. 2018-01-30 18:33:25 +08:00
Mislav Marohnić a2fb6670bb Smarter `per_page` HTTP query when limiting results
If the result limit is N, the default `per_page` will be `N + N/2`
instead of the default 100. This aims to achieve faster API requests for
relatively low values of N.
2018-01-29 23:41:23 +01: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ć 0ef312ec03 Support use of `-m '' --edit` combination 2018-01-23 17:35:42 +01:00
Michael Kaiser d2de3094a0 Add limit flag for issue and release commands 2017-10-14 23:50:39 +02:00
Sean Allred 037e068933 Add tests for --include-pulls 2017-02-15 07:38:27 -06:00
Mislav Marohnić 1a3a934714 Fix issue/PR template lookup when in a subdirectory
Always start template lookup from the toplevel directory of the repo.

Fixes #1242
2016-11-21 13:00:57 +01:00
Mislav Marohnić b972284fba Merge pull request #1245 from pcorpet/sort-issues
Add sorting options to `hub issue`.
2016-09-14 01:40:34 +02:00
Pascal Corpet 245e767614 Rename scenario, simplify checks for output and check that sort and directions params are not sent to GitHub by default. 2016-09-13 23:41:49 +02:00
Mislav Marohnić 3ab56f59b5 Fix assigning labels/assignees without the other
The GitHub API doesn't seem to like receiving `"assignees": null`.

Fixes #1240
2016-09-08 23:27:32 +02:00
Pascal Corpet 0b7a95dccd Add sorting options to `hub issue`. 2016-08-27 22:09:50 +02:00
Mislav Marohnić ca10058884 Cleanup in cukes 2016-08-21 13:23:26 +02:00
Pascal Corpet 99a0d87819 label => labels, time => date, simpler tests 2016-08-19 21:04:40 +02:00
Pascal Corpet f03978c3e8 Display only issues updated at or after a certain time. 2016-08-19 16:49:01 +02:00
Pascal Corpet 5ddce90357 Display only issues with certain labels. 2016-08-19 16:49:01 +02:00
Pascal Corpet 5bec748452 Display only issues mentioning a user. 2016-08-19 16:49:01 +02:00
Pascal Corpet 948b19f6a3 Display only issues created by <CREATOR>. 2016-08-19 16:49:01 +02:00
Pascal Corpet a6611a1758 Filter issues list by assigned milestones. 2016-08-19 16:49:01 +02:00
Mislav Marohnić 83bdc60dfa Fix listing assignees in `hub issue` 2016-08-19 15:32:58 +02:00
Mislav Marohnić 28f872978a Have `issue` command fetch all pages of API results 2016-08-16 17:29:41 +02:00
Mislav Marohnić 15b86379bc Refactor some `--format` placeholders
Renamed some existing placeholders and added new ones such as milestone
number/title, raw labels, comma-separated assignees, and number of comments.
2016-08-16 17:29:40 +02:00
Mislav Marohnić ac9ff97891 Add `issue create --browse` support to reflect `pull-request` 2016-08-15 15:34:03 +02:00
Mislav Marohnić 4c02e6a817 Add assignees & milestone support to `issue create` 2016-08-15 14:08:44 +02:00
Pascal Corpet 9531c266f4 Fix integration test and add one more 2016-05-12 15:58:51 +02:00
Mislav Marohnić 8563e678d2 Reimplement `hub issues` commands using simpleApi
- `hub issue` now displays color based on issue open/closed state
- `hub issue` no longer displays HTML URL since it was noisy
- `hub issue` no longer lists pull requests
- `hub issue create` tweaks for compatibility with `hub release create`
2016-02-03 23:05:06 +11:00
Dennis Cornwell 556a9452d3 Collapse unnecessary step into feature definition 2016-02-01 12:25:10 -05:00