Questions tagged [github-cli]

The Github CLI ("gh") is a tool for interacting with your repositories on Github straight from the command line.

gh is GitHub on the command line. It brings pull requests, issues, and other GitHub concepts to the terminal.

Useful links:

184 questions
1
vote
0 answers

How can I use GitHub CLI to include search queries with spaces?

I'm trying to use GihHub CLI to perform searches on my issues list and my search needs to be able to include spaces. My search in GitHub would look like this: label:"Pod 1" But I don't know how to construct the command line. I have tried: gh issue…
1
vote
1 answer

Retrieve description from a pull request

Ive been reading github cli but could not find how to do it or did just miss it.How do you retrieve the body from a comment in a pull request? comment description
Beelzebub
  • 33
  • 5
1
vote
1 answer

How can I utilize jq to filter out entries with value over 0?

I have the results of a Github Commandline call with the following JSON format: [ { "name": "repository-1", "pullRequests": { "totalCount": 129 } }, { "name": "repository-2", "pullRequests": { "totalCount":…
NewGuy
  • 3,273
  • 7
  • 43
  • 61
1
vote
1 answer

How can I add in-code annotations in PR reviews usign Github's `gh` tool?

On the Github web UI, I can click on a line and say something like: Good architecture, but please pass the std::vector hugedata as const &, to avoid a copy. and bundle such comments as one review with a final verdict. So far, I've…
Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
1
vote
1 answer

How to "sync" a forked repository so it has the same state as the original repository?

I did create a fork of a github repository using the API. Now after some while the fork and the original repository are out of sync. How can I sync the fork to the same state as the original repository using the API or command line git commands? I…
Alex
  • 41,580
  • 88
  • 260
  • 469
1
vote
2 answers

How to silently and automatically deploy and install Github CLI on Windows?

The Github CLI repo has an MSI installer for Windows in their latest release. The file I have been trying to install is gh_2.10.1_windows_amd64.msi. The objective is to be able to install this program remotely across many computers, meaning a silent…
geekygeek
  • 611
  • 4
  • 15
1
vote
1 answer

From github CLI, how to change from local repo to a repo on a differnt server, to create issue on that repo?

I am new to GitHub Command Line Interface (CLI). From the github command line interface, I'd wanted to create an issue, but mistakingly selected a local repo intead of the repo from which I forked from. So how can I change from the local repo to the…
28yg
  • 11
  • 2
1
vote
1 answer

how to get number of lines changed in a PR using gh cli command

I would like to find a number of lines changed for a PR using the gh cli command. Thank you for the help in advance.
Gowtham
  • 21
  • 2
1
vote
0 answers

git download only some files matching pattern

What is the easiest way to clone only files matching a certain pattern, e.g. Java files, from a repository? I can do a git clone followed by a git checkout with some pattern, but this will result in downloading unnecessary files, potentially a large…
Rafid
  • 18,991
  • 23
  • 72
  • 108
1
vote
1 answer

Looping through list of PRs using GitHub CLI?

I'm looking for advice on how to approach a certain scripting problem using GitHub CLI. Let's say I used the gh search prs "SPARK-" --match body command to get a list of all prs with the body containing the SPARK- phrase. Now, I want to loop through…
1
vote
1 answer

Github CLI - Grep for filtering by phrase in pull request body?

I’m using the Github CLI tool, which includes a command gh pr list that allows you to see all the open pull requests. The issue is that I only see a list of their titles and there’s a separate command gh pr view [extra info] that actually allows you…
1
vote
1 answer

gh command line fetch the comment for a git commit by its hash

How to fetch the github comment associated with the commit hash on a project? Lets say we have this github commit https://github.com/actions/checkout/commit/5126516654c75f76bca1de45dd82a3006d8890f9 How to fetch its comments using command line gh…
Phil
  • 46,436
  • 33
  • 110
  • 175
1
vote
0 answers

Why new laravel 9 project with github shows "git: 'auth' is not a git command. See 'git --help'"?

I created a new project with laravel new testproj --github, in order to create a repository in github, but it keeps saying git: 'auth' is not a git command. See 'git --help'. Why is that happening?
1
vote
1 answer

GitHub CLI : --template option is not supported with --team option

I would like to be able to create with GitHub CLI, from my terminal, a remote repository in an organization (of which I am an Owner) from a template that is in that same organization. The problem is that I'm getting an error message saying that the…
Daniel Schreurs
  • 186
  • 1
  • 10
1
vote
0 answers

How to build multi arch docker images with github CI without general failure if single architecture fails?

I am trying to stop my github CI from failing completely in case the build of a multi-arch docker images is successful for at least on architecture such that the successful builds of the those architectures are still pushed to docker hub. What I do…
heyhojo
  • 11
  • 1