profile
viewpoint
Mislav Marohnić mislav Amsterdam https://mislav.net =(◉ᴥ◉)= he/him

defunkt/jquery-pjax 16661

pushState + ajax = pjax

madrobby/zepto 14775

Zepto.js is a minimalist JavaScript library for modern browsers, with a jQuery-compatible API

cli/cli 10242

GitHub’s official command line tool

madrobby/scriptaculous 2322

script.aculo.us is an open-source JavaScript framework for visual effects and interface behaviours.

dgraham/delegated-events 949

A small, fast delegated event library for JavaScript.

jingweno/gh 723

Fast GitHub command line client (deprecated). gh has been merged into https://github.com/github/hub, see https://github.com/github/hub/issues/475 for more info

mislav/anyenv 275

rbenv-inspired version manager that can be configured to manage versions of ANYTHING

josh/rails-behaviors 274

Rails UJS Behaviors for jQuery and Zepto

bkeepers/github-notifications 215

A client for reading GitHub notifications

pull request commentcli/cli

Parse and respect non-github.com git remotes

This is now ready for review! All Repository and repository-related objects (such as git remotes) now have knowledge of the hostname they map to. That hostname is then respected when generating URLs for those objects, such as those for added git remotes or for web-browsing commands.

mislav

comment created time in 3 days

push eventcli/cli

naman

commit sha 3bb6983b3503686250792f85a18651a806b8d478

fix regression in support for detached HEAD state for gh pr status

view details

naman

commit sha fb7b01b40c3353015ec9b706d68b8626b356ec6d

resolve PR review

view details

naman

commit sha fffa39368356e870f70ff051518c1814b9df7f6a

fix lint

view details

gabgodBB

commit sha e6e8f701a2b3832806649d56490115c447ded754

Issue #930 - Removing color for output files

view details

Eddú Meléndez

commit sha 2943703d4a0a35855476ee8d884b6ef6bbab3cce

Add mentioned flag

view details

Eddú Meléndez

commit sha 9aebb66a3c00ccec2d0af6db968a3ddf37e3df94

Add milestone filter

view details

Eddú Meléndez

commit sha a16405650f7b99e42e99938ced5d81247edd1a49

Define query variables

view details

Eddú Meléndez

commit sha 8a96299735711353a7ae9da9882123650a82341f

Fix lint

view details

Eddú Meléndez

commit sha cffd56f717570a33ca61e44348ae3319ebbfe91e

Rename to mention

view details

Mislav Marohnić

commit sha 7907def88081f519bf3266ca975e80e5d519e434

api command: add support for REST pagination

view details

Mislav Marohnić

commit sha 3f940c98f1872d439109b4363139fe59b6097ee7

Add assertion for 1st api request before pagination

view details

Mislav Marohnić

commit sha f4ecd365a69d3491e82d52eb16b10aee66d75166

api command: add GraphQL support for `--paginate`

view details

Mislav Marohnić

commit sha 55be0d2a9ca7282c2c25e13d3bd3c67bc27347b5

Tweak `isColorEnabled`

view details

Mislav Marohnić

commit sha 04b18ea8cb2933d096f5e6b38c559538c4e26fde

:fire: unused var

view details

Mislav Marohnić

commit sha e084a4563fb8aa0d294c0db9c360aacbdf52bef4

Fix `pr checkout OWNER:BRANCH` when maintainer can modify We did not use to request the necessary GraphQL fields to determine whether the PR in question can be modified by maintainers (i.e. pushed back to).

view details

Mislav Marohnić

commit sha ac7d5ecc44a7821265b5cc8a00a9eace6428da56

Ensure markdown still passed through Glamour in no-color mode

view details

Corey Johnson

commit sha 8a4872bab38611904db7a58244c40c92c76cc8e0

Remove global repo flag

view details

Corey Johnson

commit sha dd8cbccbd54ed5b1c94560ab0d917f853ae716c9

Add repo flag to issue commands

view details

Corey Johnson

commit sha 6a02ad3f1b83cab385d36cdc0e59ef436d38cd1e

Add repoflag to pr commands

view details

Corey Johnson

commit sha 2761739c29c7f12fb9a1f21e7f5c5bb8779c212f

Correct package name

view details

push time in 3 days

pull request commentcli/cli

Issue #1038 - Include comment on pr close

I Believe is not a good practice sending comment via "parm" and we will get some issues if comment is sent by "--comment parm" while in text having quotes and/or double quotes , anothers special characters and some system variables.. like, PATH and password AND $USER, etc.

I see your point and I agree. However, when we enable adding comment via a person's text editor or from standard input, for example, we want to do that in the future and as a separate changeset.

So right now, let's just support the optional pr close --comment '...' flag and nothing else. This will also be easier to implement. The user is responsible for encoding the comment properly in their shell.

gabgodBB

comment created time in 3 days

create barnchcli/cli

branch : linter-fix

created branch time in 3 days

PR opened cli/cli

Fix linter warning about sprintf within println
+3 -3

0 comment

2 changed files

pr created time in 3 days

issue commentcli/cli

Issue clone/copy command

@leecalcote I see. How about something like:

# create a new issue using the contents of issue #123
gh issue create --title "hello" --body "$(gh issue view 123)"

Right now this would not work perfectly, since gh issue view shows other information than just body. But if you had a way to fetch the body, would this be acceptable?

leecalcote

comment created time in 3 days

delete branch cli/cli

delete branch : remove-global-repo-flag-for-real-this-time

delete time in 3 days

push eventcli/cli

Corey Johnson

commit sha 8a4872bab38611904db7a58244c40c92c76cc8e0

Remove global repo flag

view details

Corey Johnson

commit sha dd8cbccbd54ed5b1c94560ab0d917f853ae716c9

Add repo flag to issue commands

view details

Corey Johnson

commit sha 6a02ad3f1b83cab385d36cdc0e59ef436d38cd1e

Add repoflag to pr commands

view details

Corey Johnson

commit sha 2761739c29c7f12fb9a1f21e7f5c5bb8779c212f

Correct package name

view details

Corey Johnson

commit sha 625b673b587095df7d985a06e5e5883559215687

Ignore repo flag errors in determineBaseRepo

view details

Mislav Marohnić

commit sha 15126a71c9f5df113cbe8b2f3c9c1a55ffc7a73d

Merge remote-tracking branch 'origin' into remove-global-repo-flag-for-real-this-time

view details

Mislav Marohnić

commit sha db88ac415523282f6c7cba3fa6434586934ab737

Declare `-R, --repo` flag on all `issue` and `pr` subcommands

view details

Mislav Marohnić

commit sha cd5a0d69fbddd10214895bcd58bd6a1e66dd596d

:nail_polish: be clearer about the value passed to ResolveRemotesToRepos `repo` will always be blank here, so replace the argument with a blank literal instead.

view details

Mislav Marohnić

commit sha 6cc03d30ed9eac9f6ef86c7a8d229ae76d6adead

Merge pull request #1253 from cli/remove-global-repo-flag-for-real-this-time Remove the global repo flag

view details

push time in 3 days

PR merged cli/cli

Reviewers
Remove the global repo flag

The --repo flag is helpful for some commands but not others. This removes it as a global command and adds a helper function to add it to commands that need it. Here is the list.

🟢 Commands with the --repo flag

issue create
issue view
issue close
issue reopen
issue status
issue list

pr diff
pr review
pr status
pr close
pr reopen
pr merge
pr ready
pr list
pr view

🔴 Commands without the --repo flag

pr create
pr checkout

repo clone
repo create
repo fork
repo view

alias
api
completion
config
gist

Closes https://github.com/cli/cli/issues/599

+7 -9

0 comment

3 changed files

probablycorey

pr closed time in 3 days

issue closedcli/cli

Update global flags reference in Help for `gh repo` commands

The global flags include: -R, --repo OWNER/REPO Select another repository using the OWNER/REPO format

however this is unlikely to apply to most or all of the gh repo commands as I repo name/url is already needed to execute the command.

For instance, one would not use: gh repo view https://github.com/cli/cli -R tierninho/yarn as the -R flag would be ignored.

OSX, v0.6.1

closed time in 3 days

tierninho

push eventcli/cli

Mislav Marohnić

commit sha cd5a0d69fbddd10214895bcd58bd6a1e66dd596d

:nail_polish: be clearer about the value passed to ResolveRemotesToRepos `repo` will always be blank here, so replace the argument with a blank literal instead.

view details

push time in 3 days

pull request commentcli/cli

Support --web flag in issue and pr list

@AliabbasMerchant You may merge trunk now with the latest issue filters 🙇‍♂️

AliabbasMerchant

comment created time in 3 days

push eventcli/cli

Eddú Meléndez

commit sha 2943703d4a0a35855476ee8d884b6ef6bbab3cce

Add mentioned flag

view details

Eddú Meléndez

commit sha 9aebb66a3c00ccec2d0af6db968a3ddf37e3df94

Add milestone filter

view details

Eddú Meléndez

commit sha a16405650f7b99e42e99938ced5d81247edd1a49

Define query variables

view details

Eddú Meléndez

commit sha 8a96299735711353a7ae9da9882123650a82341f

Fix lint

view details

Eddú Meléndez

commit sha cffd56f717570a33ca61e44348ae3319ebbfe91e

Rename to mention

view details

Mislav Marohnić

commit sha 757bd05c7ad9e32079d91e214d3ef4d588321b6f

:nail_care: tweaks for mention/milestone filter

view details

Mislav Marohnić

commit sha 6ac61e90b70ab3b4e9ca4516880446f5f3a3d971

Merge remote-tracking branch 'origin' into add_filters_issues

view details

Mislav Marohnić

commit sha ed781103c705f02c2f2988ebb73386b86e0cb9f7

Merge pull request #644 from eddumelendez/add_filters_issues Add filters issues

view details

push time in 3 days

PR merged cli/cli

Reviewers
Add filters issues community

This commit introduces two new flags in order to filter issues per mentioned and milestone.

See #641

+33 -11

2 comments

4 changed files

eddumelendez

pr closed time in 3 days

issue commentcli/cli

Add ability to mint Personal Acess Tokens from CLI

@Zylvian The code for any client app (as opposed to a hosted web app) is distributed to its users. Every client app, even if it's just compiled binaries, thus embeds its client_secret that is trivially extracted. So for client apps, we treat their OAuth secret as non-secret.

Zylvian

comment created time in 3 days

push eventcli/cli

Pavel Borzenkov

commit sha aa8f8e8904d109e32a902c871bb75e53f03bf752

httpmock: propagate original HTTP request to HTTP response So that it's possible to access it in mocked HTTP tests. Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>

view details

Pavel Borzenkov

commit sha c66eebc6fb248b77ec8e960ededc19c9595414f9

api: return structured error for failed API calls `fmt.Errorf` hides information and makes it hard to test for specific conditions in returned error. Return a structured error instead. Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>

view details

Pavel Borzenkov

commit sha 3afec6f90aea8707de7610ce6a539faaf766c6fa

api: gracefully handle already deleted remote refs If a GitHub repo is configured to automatically delete branches after PR is merged, `gh pr merge` fails with error like: failed to delete remote branch: ... (422): 'Reference does not exist' Gracefully handle such case and don't report the error. Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>

view details

Mislav Marohnić

commit sha 1ca3d171e6de6cfdaec29b0e6bc1b76780476833

Tweak HTTP 422 handling when deleting branches

view details

Mislav Marohnić

commit sha ac04c878c071c46c272c154864207355493b293e

Merge pull request #1279 from pborzenkov/delete-branch-422 Gracefully handle "422: Reference does not exist" when deleting remote branch

view details

push time in 3 days

PR merged cli/cli

Gracefully handle "422: Reference does not exist" when deleting remote branch

<!-- Please make sure you read our contributing guidelines at https://github.com/cli/cli/blob/trunk/.github/CONTRIBUTING.md before opening a pull request. Thanks! -->

Summary

This PR modifies BrachDeleteRemote to gracefully handle the case when remote branch has already been automatically deleted by GitHub.

Closes #1010

+126 -30

1 comment

8 changed files

pborzenkov

pr closed time in 3 days

issue closedcli/cli

Gracefully handle when branches automatically deleted when PR is merged

Describe the feature or problem you’d like to solve

In our repo we have configured that branches are automatically deleted when a pull request is merged. The new gh pr merge command works great, but it produces a warning:

failed to delete remote branch <my-branch>: http error, 'https://api.github.com/repos/<my-organization>/<my-repo>/git/refs/heads/my-branch failed (422): 'Reference does not exist'

I assume it's because it tried to delete the remote branch, but couldn't find it because GitHub had already deleted it.

Proposed solution

It would be nice if the warning wasn't displayed in this case, so that it doesn't look like anything is wrong.

Additional context

Just in case, I've executed the following commands:

$ gh pr create
$ gh pr merge --squash

closed time in 3 days

janko

push eventcli/cli

AliabbasMerchant

commit sha cb2308c07767f990b3f3ddffd37ce2b7eeade03e

--silent flag in api

view details

AliabbasMerchant

commit sha 5e56e3138449a1a12ff2f7838ad70ea0ac8d1be9

Added Test for --silent flag in api

view details

AliabbasMerchant

commit sha aa43c55f60d4818f482ae64ef74f46e7e957c2c3

Skip printing headers when --silent in api

view details

AliabbasMerchant

commit sha 7a04bf1672eeffaa544b6f10e461d277b5180e41

`api --silent` Changes: Show Response Headers (if requested) even with `--silent` flag Shift silent tests to `Test_apiRun` Changed usage string of `--silent` flag

view details

Mislav Marohnić

commit sha 7eeeed9f582b64aa970418a15c7a7cd03e68db51

Merge pull request #1283 from AliabbasMerchant/apiSilent Support for --silent flag in api

view details

push time in 3 days

PR merged cli/cli

Support for --silent flag in api

Summary

closes #1188

+66 -5

0 comment

2 changed files

AliabbasMerchant

pr closed time in 3 days

issue closedcli/cli

api command: provide flag to silence output

E.g. gh api --quiet could perform the API request but not show the JSON response on stdout.

This will, of course, not be useful for GET requests, but would be useful for POST/PATCH/DELETE requests initiated from a gh alias, for example, where the user wants to do an operation but does not need to parse the response:

$ gh alias set heart 'api -H Accept:application/vnd.github.squirrel-girl-preview+json \
  repos/:owner/:repo/issues/$1/reactions --raw-field content=heart'

$ gh heart 123
#=> right now, a noisy JSON response is printed to stdout

closed time in 3 days

mislav

issue commentcli/cli

Issue clone/copy command

@leecalcote Your use case sounds to me like something that we would rather see users achieve with scripting. For example, to open multiple issues with the contents of myfile.txt for body:

contents="$(cat myfile.txt)"
for i in $(seq 1 3); do
  gh pr issue create --title "part-$i" --body "$contents"
done

I think that adding some issue clone/copy command would be too specific for a narrow use-case and wouldn't be used so often. Would you agree?

leecalcote

comment created time in 3 days

issue commentcli/cli

New `GITHUB_TOKEN` environment variable clashes with existing tools

I'd have no problem if both GITHUB_TOKEN and GH_TOKEN were supported iff GH_TOKEN took precedence

Fantastic. I think that's a great compromise ✨

zx8

comment created time in 3 days

issue commentcli/cli

project flag works differently in with the --web flag set

  1. We accept the project name everywhere, and convert the name to the path in the web mode

I'm in favor of this approach! We already resolve project names to GraphQL node IDs, so we could use those same requests to also resolve project paths and use them for --web mode.

AliabbasMerchant

comment created time in 3 days

issue commentcli/cli

Can't find project when adding new issue

@pbiology Ah, I see! We don't support user-level projects at the moment, so I'll turn this ticket into a feature request. Thank you!

pbiology

comment created time in 3 days

push eventcli/cli

Eli Schwartz

commit sha 9bbdf4af990c108ad061579085a8519de8714414

Make: properly add environment C compiler flags to CGO Do not pass LDFLAGS as arguments to -ldflags, since these are passed to 'go tool link' and C compiler ldflags need to be passed as -ldflags "-extldflags \"$LDFLAGS\"" with unreliable handling. Instead copy over (unmodified) the standard environment variable to the special golang-specific variable which the go compiler chooses to respect. While we are at it, handle CPPFLAGS and CFLAGS too.

view details

Mislav Marohnić

commit sha 7d6ae441dd6a4434118c4be22c502c2af6fb8a52

Merge pull request #1307 from eli-schwartz/makefile-cflags Make: properly add environment C compiler flags to CGO

view details

push time in 4 days

PR merged cli/cli

Make: properly add environment C compiler flags to CGO

Do not pass LDFLAGS as arguments to -ldflags, since these are passed to 'go tool link' and C compiler ldflags need to be passed as -ldflags "-extldflags "$LDFLAGS"" with unreliable handling. Instead copy over (unmodified) the standard environment variable to the special golang-specific variable which the go compiler chooses to respect.

While we are at it, handle CPPFLAGS and CFLAGS too.

+16 -5

1 comment

1 changed file

eli-schwartz

pr closed time in 4 days

issue commentcli/cli

Can't find project when adding new issue

@pbiology Thanks for writing in!

When you specify -p "my project name", we lookup that name (in a case-insensitive way) among the names of all projects in that repository or org until we find a match. Did you ensure that you are specifying the exact project name as it appears in the web UI? (Again, the case does not matter.)

@AliabbasMerchant No, we only support passing project titles. We do not support passing a path such as octo-org/1.

pbiology

comment created time in 4 days

issue commentgithub/gemoji

Aliases for Piñata

That's definitely a bug. You are welcome to submit a pull request!

stone-zeng

comment created time in 4 days

create barnchcli/cli

branch : homebrew-tap-branch

created branch time in 4 days

PR opened cli/cli

Fix `brew install github/gh/gh --HEAD`

The default behavior tried to download the "master" branch, so this retargets it.

Ref. https://github.com/github/homebrew-gh/pull/12 Followup to https://github.com/cli/cli/issues/929

+1 -1

0 comment

1 changed file

pr created time in 4 days

push eventgithub/homebrew-gh

Koichi Shiraishi

commit sha 3a224f33728d31d2211a2ad36cbdecb68c57953d

gh: fix head branch to trunk

view details

Mislav Marohnić

commit sha da6737971c8c4d96d0e63ab035bcfddd96584e62

Merge pull request #12 from zchee/fix-branch-head gh: fix head branch to trunk

view details

push time in 4 days

PR merged github/homebrew-gh

gh: fix head branch to trunk

Fix head branch to trunk.

+1 -1

0 comment

1 changed file

zchee

pr closed time in 4 days

Pull request review commentcli/cli

Allow users to view an issue or PR even when the object provided is incorrect

 func prView(cmd *cobra.Command, args []string) error { 		return err 	} -	pr, _, err := prFromArgs(ctx, apiClient, cmd, args)-	if err != nil {-		return err+	pr, baseRepo, prError := prFromArgs(ctx, apiClient, cmd, args)+	if prError != nil {+		if prError, ok := prError.(*api.PRNotFoundError); ok && !prError.UsingBranch {+			// it could be an Issue+			issue, issueError := issueFromArg(apiClient, baseRepo, args[0])

Right now, I'm not a fan of the approach where after an API error we fall back to looking up the object of a different type. Ideally, we would always run a single API request with an issue number as input and return either an issue or a PR object. I realize that this would complicate both our current query logic and return types from functions, but we could potentially do some type-switching on those return types.

@AliabbasMerchant Do you think there would be merit to this approach?

AliabbasMerchant

comment created time in 4 days

issue commentcli/cli

Alias `gh pr checkout` to `gh pr co`

@issyl0 You're right, right now aliases are only supported at "top-level" and not nested under a command such as pr. We could potentially support nested ones too, but I don't see why someone would create a 2-word alias when they can create a 1-word one.

Do you feel that this can be closed or that we should keep it open as a feature request?

issyl0

comment created time in 4 days

issue commentcli/cli

Could not resolve to a PullRequest error

@PowerKiKi That's not a bad idea! ✨

asmeurer

comment created time in 4 days

issue commentcli/cli

pr scriptability improvements

create:

  • Assume --fill was passed if STDIN fails isTerminal check
  • Assume --fill was passed if STDOUT fails isTerminal check

I'm wondering whether a safer default behavior would be to, if in non-interactive mode (and thus unable to prompt for information), to fail with an error that explains that either explicit --title or --fill flag is required? That would force scripts that use pr create to read more clearly re: what their intention is.

In general, the way I see mutation commands such as pr create or repo create is that the API operation that they will result in should be either put behind a prompt confirmation (in interactive mode) or behind an explicit flag (non-interactive mode), but should never be allowed to happen without both.

vilmibm

comment created time in 4 days

issue commentcli/cli

miscelleneous scriptability improvements

Regarding printing confirmation messages to STDERR instead of STDOUT: I'm wondering whether it would make more sense to instead generally avoid printing confirmation messages in non-interactive modes. https://github.com/cli/cli/pull/796

For example: pr list and pr create currently print lines to stderr like "Showing 30 of 30 pull requests in REPO" and "Creating pull request for X into Y in REPO", but if people find those overly verbose in their scripts, they might be tempted to silence stderr by redirecting it 2>/dev/null. That works, but if those commands fail for any reason, the legitimate error output would get silenced as well.

Same goes for alias delete/set— if users get tempted to silence stderr to avoid overly verbose output in scripts, they might unintentionally create scripts that fail silently on errors. What do you think about generally being non-verbose in scripting mode?

vilmibm

comment created time in 4 days

Pull request review commentcli/cli

Gracefully handle "422: Reference does not exist" when deleting remote branch

 func handleResponse(resp *http.Response, data interface{}) error { }  func handleHTTPError(resp *http.Response) error {-	var message string-	var parsedBody struct {-		Message string `json:"message"`+	httpError := HTTPError{+		StatusCode: resp.StatusCode,+		RequestURL: resp.Request.URL, 	}+ 	body, err := ioutil.ReadAll(resp.Body) 	if err != nil {-		return err+		httpError.Message = err.Error()+		return httpError 	}-	err = json.Unmarshal(body, &parsedBody)-	if err != nil {-		message = string(body)-	} else {-		message = parsedBody.Message++	var parsedBody struct {+		Message string `json:"message"`+	}+	if err := json.Unmarshal(body, &parsedBody); err == nil {+		httpError.Message = parsedBody.Message

Yes, this is intentional. I remembered that the body of some 5xx responses might be a HTML document (caused by e.g. an outage) and we wouldn't want to show that as error message. For non-JSON responses, I'm fine if we just report HTTP {StatusCode} on stderr.

pborzenkov

comment created time in 4 days

create barnchcli/cli

branch : missing-config-file

created branch time in 4 days

PR opened cli/cli

Support `hosts.yml` existing while `config.yml` does not

After a person copies hosts.yml to a headless system, they will still be forced to go through re-authentication flow unless they copy or initialize a config.yml as well. This fixes respecting authentication info from hosts.yml even if config.yml is missing.

Closes #1302 Followup to https://github.com/cli/cli/pull/1077

+45 -11

0 comment

4 changed files

pr created time in 4 days

issue commentcli/cli

Alias `gh pr checkout` to `gh pr co`

Hi, thanks for explaining how you're using gh!

Would it be an option for you to create a gh alias for pr checkout? E.g.

$ gh alias set co 'pr checkout'
$ gh co 123

In fact, I believe that we ship with this alias as default for new users who are installing GitHub CLI.

issyl0

comment created time in 4 days

issue closedcli/cli

gh issue list: filter by content/free text

Describe the feature or problem you’d like to solve

gh issue list only supports filtering by

  • assignee
  • author
  • label
  • state

but ideally should also accept free text entry to search inside comments.

Proposed solution

Add a new flag, e.g.

-t, --text string : Filter by text appearing in comments

This avoids people doing gh issue create when there are duplicate issues.

closed time in 5 days

casperdcl

issue commentcli/cli

gh issue list: filter by content/free text

Thanks! See https://github.com/cli/cli/pull/830 for an experiment in searching issues.

Closing as duplicate of https://github.com/cli/cli/issues/452

casperdcl

comment created time in 5 days

issue commentcli/cli

Cannot authenticate with SAML correctly.

@jethas-bennettjones Auth tokens are in ~/.config/gh, so you may nuke those config files (in the latest version it's just hosts.yml) and try again!

jethas-bennettjones

comment created time in 5 days

pull request commentcli/cli

Support --web flag in issue and pr list

@AliabbasMerchant +1 on accepting a map, or—better yet—a struct

AliabbasMerchant

comment created time in 5 days

push eventpborzenkov/cli

Mislav Marohnić

commit sha 1ca3d171e6de6cfdaec29b0e6bc1b76780476833

Tweak HTTP 422 handling when deleting branches

view details

push time in 5 days

push eventcli/cli

AliabbasMerchant

commit sha 5b9e64b4854535f6b2f307658bf28deb0a36f07d

Fix incorrect docs in Issue&PR create

view details

AliabbasMerchant

commit sha a77556237985871b2effa6bae23cc7b25b32eb6c

Added Examples for Issue and PR Create

view details

AliabbasMerchant

commit sha 4749e91c53cd5d3321bd9b31be9422d5c700543c

Use cobra Example field for issue & PR create examples

view details

naman

commit sha 3bb6983b3503686250792f85a18651a806b8d478

fix regression in support for detached HEAD state for gh pr status

view details

naman

commit sha fb7b01b40c3353015ec9b706d68b8626b356ec6d

resolve PR review

view details

naman

commit sha fffa39368356e870f70ff051518c1814b9df7f6a

fix lint

view details

gabgodBB

commit sha e6e8f701a2b3832806649d56490115c447ded754

Issue #930 - Removing color for output files

view details

AliabbasMerchant

commit sha 84f3d46338aa32597336d55e0ebcb13e85ea643f

Better example section in issue and pr create

view details

Mislav Marohnić

commit sha 3fea249d70cb4f581a34034f9bc71c150b88b895

:nail_care: tweak `issue/pr create` examples

view details

Mislav Marohnić

commit sha 4662abb312f6960424879d81d84f29b4c954c911

Merge remote-tracking branch 'origin' into fix-incorrect-docs

view details

Mislav Marohnić

commit sha 7907def88081f519bf3266ca975e80e5d519e434

api command: add support for REST pagination

view details

Mislav Marohnić

commit sha 3f940c98f1872d439109b4363139fe59b6097ee7

Add assertion for 1st api request before pagination

view details

Mislav Marohnić

commit sha f4ecd365a69d3491e82d52eb16b10aee66d75166

api command: add GraphQL support for `--paginate`

view details

Mislav Marohnić

commit sha 55be0d2a9ca7282c2c25e13d3bd3c67bc27347b5

Tweak `isColorEnabled`

view details

Mislav Marohnić

commit sha 04b18ea8cb2933d096f5e6b38c559538c4e26fde

:fire: unused var

view details

Mislav Marohnić

commit sha e084a4563fb8aa0d294c0db9c360aacbdf52bef4

Fix `pr checkout OWNER:BRANCH` when maintainer can modify We did not use to request the necessary GraphQL fields to determine whether the PR in question can be modified by maintainers (i.e. pushed back to).

view details

Mislav Marohnić

commit sha ac7d5ecc44a7821265b5cc8a00a9eace6428da56

Ensure markdown still passed through Glamour in no-color mode

view details

Corey Johnson

commit sha 6d70f31b6609423e25ac0240675362b48350c1cb

Merge pull request #994 from AliabbasMerchant/fix-incorrect-docs Fix incorrect docs in Issue&PR create

view details

Mislav Marohnić

commit sha c945fb4336ff6d6229bed30eb68d946deb110320

Automatically add `per_page=100` to paginated REST requests Most endpoints respect this parameter by default. Those that don't will just ignore it. The `per_page=100` parameter is not added if there is already a `per_page` parameter specified in the request.

view details

Mislav Marohnić

commit sha 657e633238b49f7229598debbe8f06ce410aa31a

Merge pull request #1222 from cli/api-pagination Add `api --paginate` option

view details

push time in 5 days

Pull request review commentcli/cli

shell aliases

 func ExpandAlias(args []string) ([]string, error) { 			return empty, fmt.Errorf("not enough arguments for alias: %s", expansion) 		} -		newArgs, err := shlex.Split(expansion)-		if err != nil {-			return nil, err+		isExternal := strings.HasPrefix(expansion, "!")++		if !isExternal {++			newArgs, err := shlex.Split(expansion)+			if err != nil {+				return nil, err+			}++			return append(newArgs, extraArgs...), nil+		}++		defaultShell := "sh"+		if os.Getenv("SHELL") != "" {+			defaultShell = os.Getenv("SHELL")+		}++		for _, arg := range extraArgs {+			if !strings.HasPrefix(arg, "-") {+				expansion += fmt.Sprintf(" %q ", arg)+			} else {+				expansion += fmt.Sprintf(" %s ", arg)

I've found how git handles it: basically it always does sh -c '<command> "$@"' <args> regardless of the SHELL environment variable. https://github.com/git/git/blob/050319c2ae82f2fac00eac9d80a1d91394d99aec/run-command.c#L266-L291

I think that we could follow the same principle so that people's aliases work identically regardless of their current interactive shell?

vilmibm

comment created time in 5 days

Pull request review commentcli/cli

shell aliases

 func init() { 	aliasCmd.AddCommand(aliasSetCmd) 	aliasCmd.AddCommand(aliasListCmd) 	aliasCmd.AddCommand(aliasDeleteCmd)++	aliasSetCmd.Flags().BoolP("shell", "s", false, "Whether the alias should be passed to a shell") }  var aliasCmd = &cobra.Command{ 	Use:   "alias",-	Short: "Create shortcuts for gh commands",+	Short: "Create command shortcuts",+	Long: heredoc.Doc(`+	Aliases can be used to make shortcuts for gh commands or to compose multiple commands.++	Run "gh help alias set" to learn more.+	`), }  var aliasSetCmd = &cobra.Command{ 	Use:   "set <alias> <expansion>", 	Short: "Create a shortcut for a gh command",-	Long: `Declare a word as a command alias that will expand to the specified command.+	Long: heredoc.Doc(`+	Declare a word as a command alias that will expand to the specified command(s). -The expansion may specify additional arguments and flags. If the expansion-includes positional placeholders such as '$1', '$2', etc., any extra arguments-that follow the invocation of an alias will be inserted appropriately.`,+	The expansion may specify additional arguments and flags. If the expansion+	includes positional placeholders such as '$1', '$2', etc., any extra arguments+	that follow the invocation of an alias will be inserted appropriately.++	If --shell is specified, the alias will be run through a shell. This allows you to compose+	commands with | or redirect output with >.

Could we quote bits that are not prose?

	If '--shell' is specified, the alias will be run through a shell. This allows you to compose
	commands with "|" or redirect output with ">".
vilmibm

comment created time in 5 days

Pull request review commentcli/cli

shell aliases

 func init() { 	aliasCmd.AddCommand(aliasSetCmd) 	aliasCmd.AddCommand(aliasListCmd) 	aliasCmd.AddCommand(aliasDeleteCmd)++	aliasSetCmd.Flags().BoolP("shell", "s", false, "Whether the alias should be passed to a shell")

If we wanted to avoid starting a description with "Whether", what do you think of something like this? “Declare an alias to be passed through a shell interpreter”

vilmibm

comment created time in 5 days

Pull request review commentcli/cli

shell aliases

 func ExpandAlias(args []string) ([]string, error) { 			return empty, fmt.Errorf("not enough arguments for alias: %s", expansion) 		} -		newArgs, err := shlex.Split(expansion)-		if err != nil {-			return nil, err+		isExternal := strings.HasPrefix(expansion, "!")++		if !isExternal {++			newArgs, err := shlex.Split(expansion)+			if err != nil {+				return nil, err+			}++			return append(newArgs, extraArgs...), nil+		}++		defaultShell := "sh"+		if os.Getenv("SHELL") != "" {+			defaultShell = os.Getenv("SHELL")+		}++		for _, arg := range extraArgs {+			if !strings.HasPrefix(arg, "-") {+				expansion += fmt.Sprintf(" %q ", arg)+			} else {+				expansion += fmt.Sprintf(" %s ", arg)

I have some worries about how this appends additional arguments. First of all, arguments are appended as strings to expansion, which is risky because we then need to ensure that they are quoted or otherwise escaped. Second, I don't think it gains us anything to differentiate between arguments that start with - vs. those that don't, since both can contain spaces and other special characters.

Using %q to quote a string works only for the simplest values, but we should keep in mind that this produces Go syntax which is not necessarily compatible with shells. For instance, newlines and tab characters will be encoded as \n and \t, which in bash will result in literal \n and \t strings. Furthermore, using %q doesn't escape characters that may have special meaning in the shell; most notably $.

The safest way to pass additional arguments would be to avoid encoding them as escaped strings and instead passing them as extra arguments in exec.Command. The shell equivalent of that would be:

$ sh -c 'echo 1:$1 2:$2' -- foo bar
1:foo 2:bar

$ bash -c 'echo 1:$1 2:$2' -- foo bar
1:foo 2:bar

$ zsh -c 'echo 1:$1 2:$2' -- foo bar
1:foo 2:bar

The alias would then have to explicitly choose where to place positional parameters $1, $2, "$@", etc.

Unfortunately, extra arguments appended after -c <COMMAND> are downright ignored by fish https://github.com/fish-shell/fish-shell/issues/2314

So for fish we would have to do something different or, if we go back to square one, we'd have to ensure that all arguments appended to expansion would have to be shell-escaped so that no characters within have any special meaning.

vilmibm

comment created time in 5 days

Pull request review commentcli/cli

shell aliases

 func main() { 			fmt.Fprintf(stderr, "failed to process aliases:  %s\n", err) 			os.Exit(2) 		}++		if expandedArgs == nil && err == nil {+			os.Exit(0)+		}

It might be useful to leave a comment about which case does this cover. It's not apparent to me from the code.

vilmibm

comment created time in 5 days

issue closedcli/cli

gh pr checkout --rename-branch

Congrats for the tool!

Describe the feature or problem you’d like to solve

When I check out a PR for review, I would like to use a different local branch name so I can easily distinguish my PRs from other PRs by using a naming convention

Proposed solution

To add a --rename-branch flag to gh pr checkout If the flag is followed by a name, this value will be used, otherwise pr-[Number] will be used as a default rename target.

This will simplify the life of people reviewing a lot of PR by avoiding them to remember the link between branch name & PR number

closed time in 5 days

fabriziopandini

issue commentcli/cli

gh pr checkout --rename-branch

Hi, we are already tracking this as https://github.com/cli/cli/issues/835 and https://github.com/cli/cli/issues/866.

fabriziopandini

comment created time in 5 days

push eventeddumelendez/cli

AliabbasMerchant

commit sha 5b9e64b4854535f6b2f307658bf28deb0a36f07d

Fix incorrect docs in Issue&PR create

view details

AliabbasMerchant

commit sha a77556237985871b2effa6bae23cc7b25b32eb6c

Added Examples for Issue and PR Create

view details

AliabbasMerchant

commit sha 4749e91c53cd5d3321bd9b31be9422d5c700543c

Use cobra Example field for issue & PR create examples

view details

ShubhankarKG

commit sha 2ebc5ce514780abcb8129b330a5357329f8819b0

Added examples and custom error message for space separated issues

view details

naman

commit sha 3bb6983b3503686250792f85a18651a806b8d478

fix regression in support for detached HEAD state for gh pr status

view details

naman

commit sha fb7b01b40c3353015ec9b706d68b8626b356ec6d

resolve PR review

view details

naman

commit sha fffa39368356e870f70ff051518c1814b9df7f6a

fix lint

view details

ShubhankarKG

commit sha 15ec2b748e2acfddf8a0ef8c5ff3c6da2b74b352

Refactor code

view details

gabgodBB

commit sha e6e8f701a2b3832806649d56490115c447ded754

Issue #930 - Removing color for output files

view details

Corey Johnson

commit sha 1105902935c3686e566ba78f0b8fe252851e61fc

Add more notes to triage doc

view details

Corey Johnson

commit sha 4388ff1a9121ed8b56831ae028a1beff19ebf351

spelling mistakes

view details

AliabbasMerchant

commit sha 84f3d46338aa32597336d55e0ebcb13e85ea643f

Better example section in issue and pr create

view details

ObliviousParadigm

commit sha 5851ee26ddb97ca8839217e869dc97f28e5491d9

DOC: Changed few sentences Moved code blocks to new lines to maintain consistency

view details

Mislav Marohnić

commit sha aabf34d0925dfa2181bfb0cda39bc20a62b6a5fe

Merge pull request #1204 from ObliviousParadigm/doc_fixes DOC: Changed few sentences

view details

ShubhankarKG

commit sha 21a96baf933498bb48a90e8e6cdebd5dea53ea99

Added description to nfpms

view details

Eddú Meléndez Gonzales

commit sha c70756d596a08feb7a469b6876d4ad1e416cdabf

Improve message when draft pr is created (#1202) Fixes #1199 Co-authored-by: Mislav Marohnić <mislav@github.com>

view details

Mislav Marohnić

commit sha 352999e971bc03db3a8c0ded3663418f0789e8af

Merge pull request #1211 from ShubhankarKG/package Added description to nfpms

view details

Corey Johnson

commit sha 1178f20f3d54b6c4423c8fac5b124f34da6bf4ba

Update docs/triage.md Thanks @aliabbasMerchant Co-authored-by: Aliabbas Merchant <merchantaliabbas@gmail.com>

view details

Corey Johnson

commit sha ee19d10b9531881a4d4ad94b1bc11149ba1c9036

Update update line

view details

Corey Johnson

commit sha dab44547ee3f7cf0a267b862a9bfee9dfb7d9863

Make a list

view details

push time in 5 days

Pull request review commentcli/cli

Support --web flag in issue and pr list

 func init() { 	prCmd.AddCommand(prReadyCmd)  	prCmd.AddCommand(prListCmd)+	prListCmd.Flags().BoolP("web", "w", false, "Open the browser to list the pull request(s)") 	prListCmd.Flags().IntP("limit", "L", 30, "Maximum number of items to fetch") 	prListCmd.Flags().StringP("state", "s", "open", "Filter by state: {open|closed|merged|all}") 	prListCmd.Flags().StringP("base", "B", "", "Filter by base branch")-	prListCmd.Flags().StringSliceP("label", "l", nil, "Filter by label")+	prListCmd.Flags().StringSliceP("label", "l", nil, "Filter by labels") 	prListCmd.Flags().StringP("assignee", "a", "", "Filter by assignee")+	prListCmd.Flags().StringP("author", "A", "", "Filter by author")

Let's only add --author once it's supported in both web and non-web mode https://github.com/cli/cli/pull/1102. Otherwise, people might be mislead to try it without --web and will be greeted with an error.

AliabbasMerchant

comment created time in 5 days

create barnchcli/cli

branch : path-error

created branch time in 5 days

PR opened cli/cli

Raise more informative path error when reading config file

Example:

remove or rename regular file `/home/foo/.config/gh` (must be a directory)

Fixes #1104, closes #1275

+28 -2

0 comment

1 changed file

pr created time in 5 days

Pull request review commentcli/cli

Support for --silent flag in api

 func apiRun(opts *ApiOptions) error { 		return err 	} +	if opts.Silent {+		opts.IO.Out = ioutil.Discard

On the other hand, I just realized that the response body needs to be first consumed in order for our response error processing logic to work. So, maybe discard my above comment please, as following my suggestion might lead to too many code changes. I'll leave it to you

AliabbasMerchant

comment created time in 5 days

Pull request review commentcli/cli

Support for --silent flag in api

 original query accepts an '$endCursor: String' variable and that it fetches the 	cmd.Flags().BoolVarP(&opts.ShowResponseHeaders, "include", "i", false, "Include HTTP response headers in the output") 	cmd.Flags().BoolVar(&opts.Paginate, "paginate", false, "Make additional HTTP requests to fetch all pages of results") 	cmd.Flags().StringVar(&opts.RequestInputFile, "input", "", "The file to use as body for the HTTP request")+	cmd.Flags().BoolVar(&opts.Silent, "silent", false, "Silence the output")

Let's try to be more descriptive here: how does “Do not print response body on output" sound? The goal would be to describe what "silence" means in this case, since the word could be ambiguous

AliabbasMerchant

comment created time in 5 days

Pull request review commentcli/cli

Support for --silent flag in api

 func Test_apiRun_paginationGraphQL(t *testing.T) { 	assert.Equal(t, "PAGE1_END", endCursor) } +func Test_apiRun_silent(t *testing.T) {

Instead of adding a separate test function, could you add the Silent: true mode as another test case in Test_apiRun please?

AliabbasMerchant

comment created time in 5 days

Pull request review commentcli/cli

Support for --silent flag in api

 func apiRun(opts *ApiOptions) error { 		return err 	} +	if opts.Silent {+		opts.IO.Out = ioutil.Discard

This is a neat trick! But, since parsing response JSON will take some processing time and will ultimately be discarded, could you instead skip the body processing logic in "silent" mode and exit from the command early?

AliabbasMerchant

comment created time in 5 days

Pull request review commentcli/cli

Support for --silent flag in api

 func apiRun(opts *ApiOptions) error { }  func processResponse(resp *http.Response, opts *ApiOptions) (endCursor string, err error) {-	if opts.ShowResponseHeaders {+	if opts.ShowResponseHeaders && !opts.Silent {

I don't think we need to change this conditional. In fact, if someone requested response headers, let's display them even in --silent mode. Maybe there is some use-case for that, and I think it's safe to allow because both -i and --silent flags are explicitly opt-in.

AliabbasMerchant

comment created time in 5 days

issue commentcli/cli

Could not resolve to a PullRequest error

@PowerKiKi Since jbox-web/redmine_git_hosting is a fork, gh pr checkout 123 in that repo will try to check out PR #123 of the parent repository. This might not be what you wanted.

We might change this default, but until then, the only workaround you can do is:

gh pr checkout -R jbox-web/redmine_git_hosting 123
asmeurer

comment created time in 5 days

issue commentcli/cli

api command - template replacement for :owner, :repo, :branch etc fields

This works in this repo:

$ gh api repos/:owner/:repo/branches/trunk/protection/required_status_checks
{
  "url": "https://api.github.com/repos/cli/cli/branches/trunk/protection/required_status_checks",
  "strict": false,
  "contexts": [],
  "contexts_url": "https://api.github.com/repos/cli/cli/branches/trunk/protection/required_status_checks/contexts"
}

Note that there is no :branch placeholder. Perhaps this is something that we can add in the future.

Can you debug your own attempts with DEBUG=api gh api ...?

klauern

comment created time in 5 days

issue commentcli/cli

Can't upgrade past 0.6.4 on macOS 10.11.6

Hi, I think this is a problem with Homebrew. It looks like your macOS version is not supported anymore.

You can download precompiled binaries for GitHub CLI here https://github.com/cli/cli/releases and see if they work for you!

If not, then it might be best for you to compile gh on your own system https://github.com/cli/cli/blob/trunk/docs/source.md

phil-blain

comment created time in 5 days

issue closedcli/cli

Can't upgrade past 0.6.4 on macOS 10.11.6

Describe the bug

I can't upgrade past version 0.6.4. I was on 0.6.2, did brew upgrade gh, got:

$ brew upgrade gh
Warning: You are using macOS 10.11.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.

==> Upgrading 1 outdated package:
github/gh/gh 0.6.2 -> 0.6.4
==> Upgrading github/gh/gh 0.6.2 -> 0.6.4 
==> Downloading https://github.com/cli/cli/releases/download/v0.6.4/gh_0.6.4_macOS_amd64.tar.gz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/212613049/25e31200-7452-11ea-84d9-0fb78bf6944c?X-Amz-Algorithm=AWS4-HMAC-SH
######################################################################## 100.0%


A new release of gh is available: 0.6.4 → v0.10.1
https://github.com/cli/cli/releases/tag/v0.10.1



A new release of gh is available: 0.6.4 → v0.10.1
https://github.com/cli/cli/releases/tag/v0.10.1



A new release of gh is available: 0.6.4 → v0.10.1
https://github.com/cli/cli/releases/tag/v0.10.1

==> Caveats
# --- >8 ----
==> Summary
🍺  /usr/local/Cellar/gh/0.6.4: 9 files, 17.1MB, built in 14 seconds
==> Checking for dependents of upgraded formulae...
==> No dependents found!

$ gh --version
gh version 0.6.4 (2020-04-01)
https://github.com/cli/cli/releases/tag/v0.6.4


A new release of gh is available: 0.6.4 → v0.10.1
https://github.com/cli/cli/releases/tag/v0.10.1

$ brew upgrade gh
Warning: You are using macOS 10.11.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.

Warning: github/gh/gh 0.6.4 already installed

Steps to reproduce the behavior

Try to upgrade from 0.6.2 on macOS 10.11.6...

Expected vs actual behavior

Get the latest version (v0.10.1)

Logs

See above.

closed time in 5 days

phil-blain

issue commentcli/cli

PR body(description) is not reflecting as empty even after removing the content completely

@pbharadiya Thank you for reporting!

@AliabbasMerchant If you would have time at any point in this week or next, could you look into this? I got a feeling that it might be simple to solve, and you are probably already familiar with the code in question. I think what we would have to do is distinguish between the cases when body was empty because editor was skipped and body was empty when editor was not skipped, but the user explicitly saved an empty file.

pbharadiya

comment created time in 5 days

issue closedcli/cli

Add command to request review on pr

Describe the feature or problem you’d like to solve

After creating a pull request I would like to be able to select a reviewer to review my pr from the cli

Proposed solution

gh pr <pr-no> request-review <user-name> and an option while creating the pr

How will it benefit CLI and its users? Complete the whole experience of creating a pull request

closed time in 5 days

aszenz

issue commentcli/cli

Add command to request review on pr

@aszenz Hi, you can already request reviewers during gh pr create by either using --reviewer flags or by selecting some reviewers during the interactive pr create process.

Being able to request further reviewers after the PR is already created could be useful. We're tracking this idea in https://github.com/cli/cli/issues/971 already, so I'm going to close this one as duplicate. 🙇

aszenz

comment created time in 5 days

issue commentjunegunn/fzf

Bundling fzf as a library in a Go project

@junegunn Thanks for chiming in! I see your point regarding maintenance. As a maintainer myself, I would definitely not look forward to maintaining two separate APIs for this tool, especially if I don't ever use the 2nd one myself.

I also would not recommend breaking up the entire Run() function into discrete functions, since that would be risky and I don't even think I could pull it off, since I don't understand what most of it does 😅

The only thing I would try to accomplish in a fork would be to allow the code to accept inputs other than os.Args and os.Stdin, and to allow results other than to os.Stdout followed by an os.Exit(). This might be made possible without significant changes. If we come up with a set of changes that don't look overly risky, we might propose a PR to this project and see how you feel about it. In the meantime, feel free to close this issue per others that were closed before this.

mislav

comment created time in 6 days

pull request commentcli/cli

Add `branch` command for interactive git branch switcher

We could definitely take the approach of shelling out to fzf, but with a tool like GitHub CLI, I'm personally not keen of providing an experience that's inconsistent between platforms and has 3rd-party dependencies. One of the main reasons we went with Go is because we can distribute a single compiled binary that has no runtime dependencies, and everyone who uses it gets the same functionality.

mislav

comment created time in 6 days

issue commentwhatwg/spec-factory

Script asks for username if one has a fork of any repo (even if not added as a remote)

Hi, maintainer of GitHub CLI here. I'm sorry for the confusing experience that the tool resulted in in this case.

For scripts, I would recommend that the branch is explicitly pushed to a remote before invoking gh pr create. In that case, GitHub CLI will not try to guess where the branch should be pushed prior to opening a new PR.

foolip

comment created time in 6 days

issue closedcli/cli

gh pr create unnecessarily adds a remote and prompts for credentials if one has a fork

Describe the bug

If one has a fork of a repository (but also have write access to the main repository), then gh pr create -f will add the personal fork as a fork remote, and try to push a branch there. That will ask for a username/password. But if fixed, it would also create a branch in the wrong repository.

gh version 0.10.1 (2020-06-24)

Steps to reproduce the behavior

  1. Clone a repository in an organization that you have write access to
  2. Ensure you have a personal fork of that repository
  3. Clone the original repository, and do not add your fork as a remote
  4. Check git remote -v at this point
  5. Make some change on a branch, and do gh pr create -f
  6. Check git remote -v at this point too

Expected vs actual behavior

At step 5, a remote named fork will be added and you may be prompted for credentials if you use SSH keys, which I do.

I do not want a remote to be added, I want to push a branch to the repository I have cloned, since I have write access to it.

Logs

The concrete example for me was https://github.com/whatwg/fullscreen which I have a fork of.

At step 4:

origin	git@github.com:whatwg/fullscreen.git (fetch)
origin	git@github.com:whatwg/fullscreen.git (push)

At step 5:

gh pr create -f gets stuck with a prompt:

Username for 'https://github.com':

At step 6:

fork	https://github.com/foolip/fullscreen.git (fetch)
fork	https://github.com/foolip/fullscreen.git (push)
origin	git@github.com:whatwg/fullscreen.git (fetch)
origin	git@github.com:whatwg/fullscreen.git (push)

Workaround

Delete your fork.

closed time in 6 days

foolip

issue commentcli/cli

gh pr create unnecessarily adds a remote and prompts for credentials if one has a fork

Hi, thank you for reporting! I see two problems here:

  1. You've expected the branch to be pushed to the origin repo, but it was pushed to a fork. This is currently by design #350, but we will be re-evaluating this behavior #924. For now you can choose the push target by manually pushing the branch before invoking gh pr create.

  2. The fork remote was added using https, whereas it should have ideally followed the same protocol as the origin remote and used the SSH protocol. We are tracking this in https://github.com/cli/cli/issues/1056, but for now you can configure your gh installation to always default to SSH URLs: gh config set git_protocol ssh

foolip

comment created time in 6 days

issue commentcli/cli

Cannot authenticate with SAML correctly.

but whenever I hit the "Authorize" button and added my details I received an error about SAML.

Would that error show up on the website? Can you tell us more about the exact wording of the error? (You may leave out confidential info such as names).

Could you also tell us more about how you installed gh and whether you are using any personal access tokens with CLI, either via editing config files or by having a GITHUB_TOKEN environment variable?

jethas-bennettjones

comment created time in 6 days

issue closedcli/cli

@mislav, look the sollution now, i hope you enjoy :smiley:

@mislav, look the sollution now, i hope you enjoy :smiley: How we can talk about implementation before i act on some issue? Email? here?

Originally posted by @gabgodBB in https://github.com/cli/cli/pull/1187#issuecomment-643399039

closed time in 6 days

onearm71

issue commentcli/cli

api command - template replacement for :owner, :repo, :branch etc fields

I would love to be able to just cd into a repo and run

gh api repos/:owner/:repo/releases

and have it infer that because it's in klauern/whatever-my-cool-project-is and fill in the blank for :owner and :repo.

This is exactly how the :owner and :repo feature works. Did you try it?

Per gh help api:

Placeholder values ":owner" and ":repo" in the endpoint argument will get replaced with values from the repository of the current directory.

klauern

comment created time in 6 days

PR closed cli/cli

👌
+0 -0

0 comment

0 changed file

firdaus29syafiqa

pr closed time in 6 days

issue openedjunegunn/fzf

Bundling fzf as a library in a Go project

<!-- ISSUES NOT FOLLOWING THIS TEMPLATE WILL BE CLOSED AND DELETED -->

<!-- Check all that apply [x] -->

  • [x] I have read through the manual page (man fzf)
  • [x] I have the latest version of fzf
  • [x] I have searched through the existing issues

Info

  • OS
    • [ ] Linux
    • [x] Mac OS X
    • [ ] Windows
    • [ ] Etc.
  • Shell
    • [ ] bash
    • [x] zsh
    • [ ] fish

Problem / Steps to reproduce

Hi, I'd love to use fzf in our Go project, but we would prefer to bundle it as a runtime module rather than shelling out to fzf which may be missing on a person's system. Here's a sketch of how we would use it (note that we currently shell).

It looks like right now, fzf is not designed to run as a library, since most of the implementation is in a giant function Run() that invokes os.Exit upon completion, effectively shutting down the parent process. Furthermore, there doesn't seem to be a way to instantiate the options struct with arbitrary args instead of os.Args.

Would this project accept contributions that make it possible for fzf to be used as a library in addition to being its own executable? Thank you!

created time in 9 days

PR opened cli/cli

Add `branch` command for interactive git branch switcher

Note: the functionality described here did not pass any design phase yet

This adds a gh branch command that presents an interactive git branch switcher.

Dependencies: fzf (install it via brew install fzf)

branch

Features:

  • navigate up/down via <kbd>Down</kbd>/<kbd>Up</kbd> or <kbd>Ctrl-j</kbd>/<kbd>Ctrl-k</kbd>
  • type to fuzzy filter
  • <kbd>Enter</kbd> to switch branches
  • sorts branches by most recently committed
  • presents information about linked pull requests
+300 -12

0 comment

4 changed files

pr created time in 9 days

create barnchcli/cli

branch : branch-switcher

created branch time in 9 days

issue commentcli/cli

Auto reduce when use --paginate

Thanks for the feedback! I think reducing is a good idea, but it might be tricky to achieve for GraphQL requests. That's why we currently dump raw JSON responses without changing them.

carnei-ro

comment created time in 9 days

PR opened microsoft/winget-pkgs

GitHub CLI 0.10.1
+17 -0

0 comment

1 changed file

pr created time in 9 days

push eventmislav/winget-pkgs

Mislav Marohnić

commit sha e8553b0cf9caa62b383d042a7ffa77a343b5d601

GitHub CLI 0.10.1

view details

push time in 9 days

fork mislav/winget-pkgs

The Microsoft community Windows Package Manager manifest repository

fork in 9 days

issue closedcli/cli

test hope you have good filters test

closed time in 9 days

dezren39

issue commentcli/cli

test hope you have good filters test

Hello! If you're just testing GitHub CLI, please do so in your own repository so we avoid triggering notifications in this repository. Thank you!

dezren39

comment created time in 9 days

issue commentcli/cli

`gh` fails if access token is invalidated

@sqren Sorry for the bad experience. I think we should in the future show you the link like hub does.

In the meantime, you can delete ~/.config/gh/hosts.yml and that will force re-authentication.

sqren

comment created time in 9 days

delete branch cli/cli

delete branch : pr-status-no-commits

delete time in 10 days

delete branch cli/cli

delete branch : repo-view-terminal

delete time in 10 days

delete branch cli/cli

delete branch : gh-config

delete time in 10 days

delete branch cli/cli

delete branch : respect-editor

delete time in 10 days

delete branch cli/cli

delete branch : reauth-bug

delete time in 10 days

delete branch cli/cli

delete branch : pr-diff

delete time in 10 days

delete branch cli/cli

delete branch : respect-protocol

delete time in 10 days

delete branch cli/cli

delete branch : heathy-helping

delete time in 10 days

delete branch cli/cli

delete branch : review

delete time in 10 days

more