Mislav Marohnić
c5af4ddfdc
Merge pull request #3009 from cli/git-credential-env
...
Fix `auth git-credential` when the token comes from environment
2021-02-23 16:32:23 +01:00
Gowtham Munukutla
cbf8a0d964
Accept only one argument when deleting a gist
2021-02-23 20:12:26 +05:30
Mislav Marohnić
fee7adf9ba
Add issue create -F <file> flag and tests
2021-02-23 14:25:32 +01:00
castaneai
13c3c6543b
Add pr create --body-file flag
2021-02-23 12:58:34 +01:00
Gowtham Munukutla
a60a6d854b
Merge branch 'trunk' of https://github.com/cli/cli into feature/add-files-to-gist
2021-02-23 17:13:07 +05:30
Mislav Marohnić
cfddda8829
Indicate workflow scope is GHE 3.0+ only during auth login
2021-02-23 10:52:29 +01:00
Mislav Marohnić
f807795491
Fix pasting Personal Access Token to auth login for GHE
2021-02-23 10:19:11 +01:00
Mislav Marohnić
329ba1d57b
Add --filter to api command to filter data using jq syntax
2021-02-22 17:51:58 +01:00
Mislav Marohnić
fd82d621d5
Add color function to api templates
2021-02-22 16:54:27 +01:00
Mislav Marohnić
517cfc2365
Add api --format flag for specifying an output template
...
With the `--format` flag, the value of the flag is parsed as a Go
template which is then evaluated against parsed response data.
https://golang.org/pkg/text/template
2021-02-22 16:15:02 +01:00
Mislav Marohnić
9dff05bf20
Add api --cache flag
...
Cache API responses on disk for a specified duration.
2021-02-22 16:13:24 +01:00
Cristian Dominguez
2284ef43d0
repo list: add tests
2021-02-19 17:34:17 -03:00
Mislav Marohnić
9bf1668b3f
Fix auth git-credential when the token comes from environment
...
When a token such as GH_TOKEN is set through environment variables and
`~/.config/gh/hosts.yml` is non-existent, the `auth git-credential get`
command used to fail due to missing username.
Since GitHub username isn't at all required for token authentication,
use the `x-access-token` faux username instead of trying to obtain one
from a config file.
2021-02-19 15:37:11 +01:00
Gowtham Munukutla
faffc4de95
Add go fmt to pass ci/cd
2021-02-19 12:05:20 +05:30
Gowtham Munukutla
4ed10140ab
Resolved PR review comments and test cases
2021-02-19 12:02:17 +05:30
Cristian Dominguez
cad875a05f
repo list: render repo tags into the 3rd column instead of the 2nd
2021-02-18 19:02:59 -03:00
Cristian Dominguez
b7c2865d0f
Remove archived filter from repo list
2021-02-18 17:34:00 -03:00
Gowtham Munukutla
882bd1adb1
add go lint to pass checks
2021-02-18 22:39:56 +05:30
Gowtham Munukutla
a4a194011f
gofmt
2021-02-18 19:18:49 +05:30
Gowtham Munukutla
9a4fd0d706
Remove unwanted prompt for user. Unwanted test as well
2021-02-18 19:17:42 +05:30
Gowtham Munukutla
d469f4b2cc
Merge branch 'trunk' of https://github.com/cli/cli into feature/add-files-to-gist
2021-02-18 18:46:40 +05:30
Gowtham Munukutla
bff8b3007a
Add test cases and improve errors with color schemes
2021-02-18 18:45:43 +05:30
Nate Smith
2f563babbf
Merge pull request #2990 from cli/ssh-key-commands
...
Add `ssh-key add` command and publish `ssh-key`
2021-02-17 14:30:37 -06:00
Mislav Marohnić
e596f8732b
Fix creating a repository from template
...
Fixes a problem where setting up a new local directory for the
repository created from a template would not contain any files:
gh repo create -p OWNER/some-template my-repo --private --confirm
ls my-repo
//=> [empty directory]
Fixes #2290
2021-02-17 20:26:06 +01:00
Mislav Marohnić
a8fdd9a303
Further clarify what will happen on repo create
...
In local git directory:
1. `This will add an "origin" git remote to your local repository. Continue?`
2. "origin" git remote is added in current directory.
Outside of a local git directory:
1. This will create the "REPO" repository on GitHub. Continue?
2. `Create a local project directory for "REPO"?`
3. new directory called "REPO" now set up for the GitHub repository.
2021-02-17 20:22:23 +01:00
Mislav Marohnić
1a9e42ed55
Add ssh-key add command and publish ssh-key
2021-02-17 19:46:59 +01:00
Nate Smith
e91b97b4c5
fully restore fork remote renaming behavior ( #2982 )
...
* fully restore fork remote renaming behavior
* catch blank remote name and error + arg tests
* hard wrap fork usage
* do not rename if remote-name supplied
* tweak error text
2021-02-17 12:33:22 -06:00
Nate Smith
4a897f70c3
Merge pull request #2962 from ulwlu/fix_prompt_string_when_creating_remote_repository
...
Fix prompt string when creating remote repository
2021-02-17 12:32:27 -06:00
Mislav Marohnić
a90997ec95
pr merge: avoid prompting to enter editor after editing phase is chosen
...
When user chooses "Edit commit message", open the editor immediately
instead of showing an additional prompt to open the editor.
2021-02-17 18:47:17 +01:00
Mislav Marohnić
70d4786e37
Merge pull request #2988 from cli/strict-status-checks-base
...
pr status: fix checking branch protection rules on the base branch
2021-02-17 18:13:15 +01:00
Mislav Marohnić
05421db404
pr status: fix checking branch protection rules on the base branch
...
Instead of checking branch protection rules on the main branch of the
repository, branch protection rules for a specific PR should be checked
on its base branch, since not all PRs are based on the main branch.
Additionally, do not display "Up to date" if the actual merge status
reported from the server was "UNKNOWN" or "DIRTY", since in those cases
"Up to date" could be false information.
2021-02-17 18:04:49 +01:00
Mislav Marohnić
3b117e6c3c
Merge pull request #2539 from divyaramanathan/issue-create-template
...
Implementing issue template GraphQL API call
2021-02-17 17:59:42 +01:00
Mislav Marohnić
3a0a8c4e25
Add tests for templateManager
2021-02-17 17:35:04 +01:00
Mislav Marohnić
4a49e3526c
Merge remote-tracking branch 'origin' into writeorg-oauth-scope
2021-02-17 17:11:24 +01:00
Mislav Marohnić
0cd5744398
Un-export HasAPI leaky abstraction
2021-02-17 17:08:50 +01:00
Mislav Marohnić
3a224b7c2a
Merge pull request #2892 from cli/auth-with-ssh
...
Add SSH key generation & uploading to `gh auth login` flow
2021-02-17 17:07:05 +01:00
Mislav Marohnić
b4bf8cda8d
Close pubkey file after reading
2021-02-17 17:01:14 +01:00
Mislav Marohnić
87fcda5fbc
Add tests for SSH login flow
2021-02-17 16:52:40 +01:00
Gowtham Munukutla
2983887458
Add files by absolute path to gist
2021-02-17 20:39:43 +05:30
Mislav Marohnić
4cd43cc8ef
Merge remote-tracking branch 'origin' into auth-with-ssh
2021-02-17 15:29:36 +01:00
Mislav Marohnić
ebc5d01942
Merge remote-tracking branch 'origin' into auto-merge
2021-02-17 15:25:25 +01:00
Mislav Marohnić
203397baf9
Add tests for pr merge --auto/--disable-auto
2021-02-17 15:24:52 +01:00
Gowtham Munukutla
037343c5c2
Add existing files in the current wd to gist
2021-02-17 19:20:43 +05:30
Mislav Marohnić
ddddd95d73
Allow pr merge --body '' to prevent having the default body applied
2021-02-17 14:38:33 +01:00
Mislav Marohnić
12cf8ef65b
Separately query viewerMergeBodyText for GHE compatibility
...
GHE versions 2.22 and older will not have this GraphQL field. Avoid the
resulting error and have the command proceeed with empty text as the
default.
2021-02-17 14:06:27 +01:00
Mislav Marohnić
2b36b09abf
Update wording for auto-merge confirmation
...
Co-authored-by: Amanda Pinsker <ampinsk@github.com>
2021-02-17 12:30:04 +01:00
Gowtham Munukutla
05e45e3863
Feature of adding new files to an existing Github gist
2021-02-17 11:27:57 +05:30
Nate Smith
c2c211dbed
Merge pull request #2952 from redreceipt/up-to-date
...
Adds Branch Up to Date Status
2021-02-16 12:50:28 -06:00
vilmibm
57140ad35e
add header in correct place
2021-02-16 12:25:09 -06:00
Mislav Marohnić
3b650a8c56
Fix typo
2021-02-16 16:28:23 +01:00