Before, when gh detected there was a new release in the `cli/cli` repo,
it would show this notice:
A new release of gh is available: {V1} → {V2}
Additionally, when the release was more than 24h old, we would show this
to Homebrew users:
To upgrade, run: brew update && brew upgrade gh
Ref. feb4acc2c0
This change makes it so that the original notice "A new release of gh is
available" is NOT shown to Homebrew users unless the release is older
than 24h. We effectively hide the fact that any release happened until
we're sure that the version bump has made it to `homebrew-core`.
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.
* 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
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.
For single-commit PRs, the commit subject will be the subject of the
head commit and the PR number. For multi-commit PRs, the commit subject
will be the PR title and PR number. Instead of trying to replicate this
logic client-side, omit the `commitHeadline` param and let the server
apply defaults appropriately.
Reverts https://github.com/cli/cli/pull/1627
If someone pastes a PAT with `write:org` scope, this avoids the error
complaining that the token doesn't have `read:org` permissions. On
GitHub, `write:org` implies `read:org`.
If you are in git project not pushed to remote yet,
prompt says 'This will create {reponame} in current directory. Continue?',
however, it doesn't create while it only adds remote origin.
I was going to create PR to avoid creating new directory before I knew
this behavior.
This behavior is already ideal, so I changed prompt not to scare users
like I got scared.