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

13 Коммитов

Автор SHA1 Сообщение Дата
Mislav Marohnić b7dc8e0b0e [gist] Support `--browse`, `--copy`, and `--noop` flags 2019-10-18 13:19:49 +02:00
Mislav Marohnić 5dd4ac94b4 [gist] Remove the `--json` flag
The `gist show --json` representation wasn't the full JSON payload of
a gist. For programmatic use of gists, `hub api` is better:

    hub api gists/:id  | jq '.files | keys'

This will output JSON exactly as it's received from the API and it frees
us from having to reimplement parts of this functionality within `gist`.
2019-10-18 12:29:30 +02:00
Mislav Marohnić 603a731aa4 [gist] Use first configured API hosts instead of prompting
If hub is configured with multiple hosts (usually including GitHub
Enterprise instances), every invocation to `hub gist` would prompt to
select a host. Assume that people want to use the first configured host
by default (they can change it via GITHUB_HOST).
2019-10-18 12:16:28 +02:00
Mislav Marohnić 7f02e371f2 [gist] Tweaks docs 2019-10-18 11:59:09 +02:00
Phil Dibowitz 597604d777 fix help 2019-10-18 00:11:29 -07:00
Phil Dibowitz 2507852e48 update tests 2019-10-18 00:09:52 -07:00
Phil Dibowitz 194be2ae9f code review bits 2019-10-17 23:59:27 -07:00
Mislav Marohnić 9e7f3920db [gist] Rename variables to camelCase 2019-10-07 13:51:38 +02:00
Mislav Marohnić dffd80c585 [gist] Print files in consistent alphabetical order 2019-10-07 13:19:25 +02:00
Mislav Marohnić ecea276617 [gist] Enable command outside the context of a repo 2019-10-07 12:49:09 +02:00
Mislav Marohnić f6ebe22633 [gist] Improve error handling on create operation 2019-10-07 12:31:43 +02:00
Phil Dibowitz c9f3dc0c23 Code review fixes
* Stop using GenericAPIRequest
* Move GH interactions and structs to `client.go`
* Catch scopes problems
2019-10-05 16:11:54 -07:00
Phil Dibowitz 1e35be83c1 Make a gist command
This addresses #2226 and #2116 by creating a `gist` subcommand.

This allows you to both create and retrieve gists. When creating a gist
it can be public or private.

In order to do this, the `gist` scope is added to the token we request.

Closes: #2226
Closes: #2116

Signed-off-by: Phil Dibowitz <phil@ipom.com>
2019-09-16 23:55:58 -07:00