Remove trailing whitespace
This commit is contained in:
parent
cdb44f8298
commit
8b7fb231ec
24 changed files with 54 additions and 54 deletions
|
|
@ -34,19 +34,19 @@ func actionsExplainer(cs *iostreams.ColorScheme) string {
|
|||
GitHub CLI integrates with GitHub Actions to help you manage runs and workflows.
|
||||
|
||||
%[3]s
|
||||
gh run list: List recent workflow runs
|
||||
gh run view: View details for a workflow run or one of its jobs
|
||||
gh run watch: Watch a workflow run while it executes
|
||||
gh run rerun: Rerun a failed workflow run
|
||||
gh run list: List recent workflow runs
|
||||
gh run view: View details for a workflow run or one of its jobs
|
||||
gh run watch: Watch a workflow run while it executes
|
||||
gh run rerun: Rerun a failed workflow run
|
||||
gh run download: Download artifacts generated by runs
|
||||
|
||||
To see more help, run %[1]sgh help run <subcommand>%[1]s
|
||||
|
||||
%[4]s
|
||||
gh workflow list: List workflow files in your repository
|
||||
gh workflow view: View details for a workflow file
|
||||
gh workflow enable: Enable a workflow file
|
||||
gh workflow disable: Disable a workflow file
|
||||
gh workflow view: View details for a workflow file
|
||||
gh workflow enable: Enable a workflow file
|
||||
gh workflow disable: Disable a workflow file
|
||||
gh workflow run: Trigger a workflow_dispatch run for a workflow file
|
||||
|
||||
To see more help, run %[1]sgh help workflow <subcommand>%[1]s
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ func NewCmdLogin(f *cmdutil.Factory, runF func(*LoginOptions) error) *cobra.Comm
|
|||
The minimum required scopes for the token are: %[1]srepo%[1]s, %[1]sread:org%[1]s, and %[1]sgist%[1]s.
|
||||
Take care when passing a fine-grained personal access token to %[1]s--with-token%[1]s
|
||||
as the inherent scoping to certain resources may cause confusing behaviour when interacting with other
|
||||
resources. Favour setting %[1]sGH_TOKEN$%[1]s for fine-grained personal access token usage.
|
||||
resources. Favour setting %[1]sGH_TOKEN$%[1]s for fine-grained personal access token usage.
|
||||
|
||||
Alternatively, gh will use the authentication token found in environment variables.
|
||||
This method is most suitable for "headless" use of gh such as in automation. See
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ func newRebuildCmd(app *App) *cobra.Command {
|
|||
Short: "Rebuild a codespace",
|
||||
Long: heredoc.Doc(`
|
||||
Rebuilding recreates your codespace.
|
||||
|
||||
|
||||
Your code and any current changes will be preserved. Your codespace will be rebuilt using
|
||||
your working directory's dev container. A full rebuild also removes cached Docker images.
|
||||
`),
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ func newSSHCmd(app *App) *cobra.Command {
|
|||
Long: heredoc.Docf(`
|
||||
The %[1]sssh%[1]s command is used to SSH into a codespace. In its simplest form, you can
|
||||
run %[1]sgh cs ssh%[1]s, select a codespace interactively, and connect.
|
||||
|
||||
|
||||
The %[1]sssh%[1]s command will automatically create a public/private ssh key pair in the
|
||||
%[1]s~/.ssh%[1]s directory if you do not have an existing valid key pair. When selecting the
|
||||
key pair to use, the preferred order is:
|
||||
|
|
@ -732,8 +732,8 @@ func newCpCmd(app *App) *cobra.Command {
|
|||
be evaluated on the remote machine, subject to expansion of tildes, braces, globs,
|
||||
environment variables, and backticks. For security, do not use this flag with arguments
|
||||
provided by untrusted users; see <https://lwn.net/Articles/835962/> for discussion.
|
||||
|
||||
By default, the %[1]scp%[1]s command will create a public/private ssh key pair to authenticate with
|
||||
|
||||
By default, the %[1]scp%[1]s command will create a public/private ssh key pair to authenticate with
|
||||
the codespace inside the %[1]s~/.ssh directory%[1]s.
|
||||
`, "`"),
|
||||
Example: heredoc.Doc(`
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ func newViewCmd(app *App) *cobra.Command {
|
|||
Short: "View details about a codespace",
|
||||
Example: heredoc.Doc(`
|
||||
# select a codespace from a list of all codespaces you own
|
||||
$ gh cs view
|
||||
$ gh cs view
|
||||
|
||||
# view the details of a specific codespace
|
||||
$ gh cs view -c codespace-name-12345
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ func NewCmdCompletion(io *iostreams.IOStreams) *cobra.Command {
|
|||
After, add this to your %[1]s~/.bash_profile%[1]s:
|
||||
|
||||
eval "$(gh completion -s bash)"
|
||||
|
||||
|
||||
### zsh
|
||||
|
||||
Generate a %[1]s_gh%[1]s completion script and put it somewhere in your %[1]s$fpath%[1]s:
|
||||
|
|
@ -44,7 +44,7 @@ func NewCmdCompletion(io *iostreams.IOStreams) *cobra.Command {
|
|||
|
||||
autoload -U compinit
|
||||
compinit -i
|
||||
|
||||
|
||||
Zsh version 5.7 or later is recommended.
|
||||
|
||||
### fish
|
||||
|
|
@ -59,7 +59,7 @@ func NewCmdCompletion(io *iostreams.IOStreams) *cobra.Command {
|
|||
|
||||
mkdir -Path (Split-Path -Parent $profile) -ErrorAction SilentlyContinue
|
||||
notepad $profile
|
||||
|
||||
|
||||
Add the line and save the file:
|
||||
|
||||
Invoke-Expression -Command $(gh completion -s powershell | Out-String)
|
||||
|
|
|
|||
|
|
@ -540,14 +540,14 @@ func Test_listRun(t *testing.T) {
|
|||
wantOut: heredoc.Doc(`
|
||||
1234 main.txt
|
||||
octo match in the description
|
||||
|
||||
|
||||
2345 octo.txt
|
||||
match in the file name
|
||||
|
||||
3456 main.txt
|
||||
match in the file text
|
||||
octo in the text
|
||||
|
||||
|
||||
`),
|
||||
},
|
||||
{
|
||||
|
|
@ -599,14 +599,14 @@ func Test_listRun(t *testing.T) {
|
|||
wantOut: heredoc.Docf(`
|
||||
%[1]s[0;34m1234%[1]s[0m %[1]s[0;32mmain.txt%[1]s[0m
|
||||
%[1]s[0;30;43mocto%[1]s[0m%[1]s[0;1;39m match in the description%[1]s[0m
|
||||
|
||||
|
||||
%[1]s[0;34m2345%[1]s[0m %[1]s[0;30;43mocto%[1]s[0m%[1]s[0;32m.txt%[1]s[0m
|
||||
%[1]s[0;1;39mmatch in the file name%[1]s[0m
|
||||
|
||||
|
||||
%[1]s[0;34m3456%[1]s[0m %[1]s[0;32mmain.txt%[1]s[0m
|
||||
%[1]s[0;1;39mmatch in the file text%[1]s[0m
|
||||
%[1]s[0;30;43mocto%[1]s[0m in the text
|
||||
|
||||
|
||||
`, "\x1b"),
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ func TestListRun(t *testing.T) {
|
|||
wantStdout: heredoc.Doc(`
|
||||
|
||||
Showing 2 of 2 labels in OWNER/REPO
|
||||
|
||||
|
||||
NAME DESCRIPTION COLOR
|
||||
bug This is a bug label #d73a4a
|
||||
docs This is a docs label #ffa8da
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ func closeRun(opts *CloseOptions) error {
|
|||
branchSwitchString = fmt.Sprintf(" and switched to branch %s", cs.Cyan(branchToSwitchTo))
|
||||
}
|
||||
} else {
|
||||
fmt.Fprintf(opts.IO.ErrOut, "%s Skipped deleting the local branch since current directory is not a git repository \n", cs.WarningIcon())
|
||||
fmt.Fprintf(opts.IO.ErrOut, "%s Skipped deleting the local branch since current directory is not a git repository\n", cs.WarningIcon())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ func TestPrClose_deleteBranch_notInGitRepo(t *testing.T) {
|
|||
assert.Equal(t, "", output.String())
|
||||
assert.Equal(t, heredoc.Doc(`
|
||||
✓ Closed pull request OWNER/REPO#96 (The title of the PR)
|
||||
! Skipped deleting the local branch since current directory is not a git repository
|
||||
! Skipped deleting the local branch since current directory is not a git repository
|
||||
✓ Deleted branch trunk
|
||||
`), output.Stderr())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ func NewCmdEditItem(f *cmdutil.Factory, runF func(config editItemConfig) error)
|
|||
Short: "Edit an item in a project",
|
||||
Long: heredoc.Docf(`
|
||||
Edit either a draft issue or a project item. Both usages require the ID of the item to edit.
|
||||
|
||||
|
||||
For non-draft issues, the ID of the project is also required, and only a single field value can be updated per invocation.
|
||||
|
||||
Remove project item field value using %[1]s--clear%[1]s flag.
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co
|
|||
$ gh release create v1.2.3 --notes-from-tag
|
||||
|
||||
Don't mark the release as latest
|
||||
$ gh release create v1.2.3 --latest=false
|
||||
$ gh release create v1.2.3 --latest=false
|
||||
|
||||
Upload all tarballs in a directory as release assets
|
||||
$ gh release create v1.2.3 ./dist/*.tgz
|
||||
|
|
|
|||
|
|
@ -144,15 +144,15 @@ func Test_viewRun(t *testing.T) {
|
|||
wantStdout: heredoc.Doc(`
|
||||
v1.2.3
|
||||
MonaLisa released this about 1 day ago
|
||||
|
||||
|
||||
|
||||
• Fixed bugs
|
||||
|
||||
|
||||
|
||||
|
||||
Assets
|
||||
windows.zip 12 B
|
||||
linux.tgz 34 B
|
||||
|
||||
|
||||
View on GitHub: https://github.com/OWNER/REPO/releases/tags/v1.2.3
|
||||
`),
|
||||
wantStderr: ``,
|
||||
|
|
@ -168,15 +168,15 @@ func Test_viewRun(t *testing.T) {
|
|||
wantStdout: heredoc.Doc(`
|
||||
v1.2.3
|
||||
MonaLisa released this about 1 day ago
|
||||
|
||||
|
||||
|
||||
• Fixed bugs
|
||||
|
||||
|
||||
|
||||
|
||||
Assets
|
||||
windows.zip 12 B
|
||||
linux.tgz 34 B
|
||||
|
||||
|
||||
View on GitHub: https://github.com/OWNER/REPO/releases/tags/v1.2.3
|
||||
`),
|
||||
wantStderr: ``,
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ func NewCmdDelete(f *cmdutil.Factory, runF func(*DeleteOptions) error) *cobra.Co
|
|||
Short: "Delete a repository",
|
||||
Long: heredoc.Docf(`
|
||||
Delete a GitHub repository.
|
||||
|
||||
|
||||
With no argument, deletes the current repository. Otherwise, deletes the specified repository.
|
||||
|
||||
Deletion requires authorization with the %[1]sdelete_repo%[1]s scope.
|
||||
Deletion requires authorization with the %[1]sdelete_repo%[1]s scope.
|
||||
To authorize, run %[1]sgh auth refresh -s delete_repo%[1]s
|
||||
`, "`"),
|
||||
Args: cobra.MaximumNArgs(1),
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ func NewCmdAdd(f *cmdutil.Factory, runF func(*AddOptions) error) *cobra.Command
|
|||
Short: "Add a deploy key to a GitHub repository",
|
||||
Long: heredoc.Doc(`
|
||||
Add a deploy key to a GitHub repository.
|
||||
|
||||
|
||||
Note that any key added by gh will be associated with the current authentication token.
|
||||
If you de-authorize the GitHub CLI app or authentication token from your account, any
|
||||
deploy keys added by GitHub CLI will be removed as well.
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ func NewCmdView(f *cmdutil.Factory, runF func(*ViewOptions) error) *cobra.Comman
|
|||
Short: "View an available repository gitignore template",
|
||||
Long: heredoc.Docf(`
|
||||
View an available repository %[1]s.gitignore%[1]s template.
|
||||
|
||||
|
||||
%[1]s<template>%[1]s is a case-sensitive %[1]s.gitignore%[1]s template name.
|
||||
|
||||
For a list of available templates, run %[1]sgh repo gitignore list%[1]s.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman
|
|||
Short: "List common repository licenses",
|
||||
Long: heredoc.Doc(`
|
||||
List common repository licenses.
|
||||
|
||||
|
||||
For even more licenses, visit <https://choosealicense.com/appendix>
|
||||
`),
|
||||
Aliases: []string{"ls"},
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ func TestViewRun(t *testing.T) {
|
|||
wantErr: true,
|
||||
errMsg: heredoc.Docf(`
|
||||
'404' is not a valid license name or SPDX ID.
|
||||
|
||||
|
||||
Run %[1]sgh repo license list%[1]s to see available commonly used licenses. For even more licenses, visit https://choosealicense.com/appendix`, "`"),
|
||||
httpStubs: func(reg *httpmock.Registry) {
|
||||
reg.Register(
|
||||
|
|
|
|||
|
|
@ -52,12 +52,12 @@ func NewCmdRename(f *cmdutil.Factory, runf func(*RenameOptions) error) *cobra.Co
|
|||
Short: "Rename a repository",
|
||||
Long: heredoc.Docf(`
|
||||
Rename a GitHub repository.
|
||||
|
||||
|
||||
%[1]s<new-name>%[1]s is the desired repository name without the owner.
|
||||
|
||||
|
||||
By default, the current repository is renamed. Otherwise, the repository specified
|
||||
with %[1]s--repo%[1]s is renamed.
|
||||
|
||||
|
||||
To transfer repository ownership to another user account or organization,
|
||||
you must follow additional steps on GitHub.com
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman
|
|||
|
||||
Use the %[1]s--parents%[1]s flag to control whether rulesets configured at higher levels that also apply to the provided
|
||||
repository or organization should be returned. The default is %[1]strue%[1]s.
|
||||
|
||||
|
||||
Your access token must have the %[1]sadmin:org%[1]s scope to use the %[1]s--org%[1]s flag, which can be granted by running %[1]sgh auth refresh -s admin:org%[1]s.
|
||||
`, "`"),
|
||||
Example: heredoc.Doc(`
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ func NewCmdView(f *cmdutil.Factory, runF func(*ViewOptions) error) *cobra.Comman
|
|||
|
||||
If no ID is provided, an interactive prompt will be used to choose
|
||||
the ruleset to view.
|
||||
|
||||
|
||||
Use the %[1]s--parents%[1]s flag to control whether rulesets configured at higher
|
||||
levels that also apply to the provided repository or organization should
|
||||
be returned. The default is %[1]strue%[1]s.
|
||||
|
|
|
|||
|
|
@ -158,14 +158,14 @@ func Test_viewRun(t *testing.T) {
|
|||
Source: my-owner/repo-name (Repository)
|
||||
Enforcement: Active
|
||||
You can bypass: pull requests only
|
||||
|
||||
|
||||
Bypass List
|
||||
- OrganizationAdmin (ID: 1), mode: always
|
||||
- RepositoryRole (ID: 5), mode: always
|
||||
|
||||
|
||||
Conditions
|
||||
- ref_name: [exclude: []] [include: [~ALL]]
|
||||
|
||||
|
||||
Rules
|
||||
- commit_author_email_pattern: [name: ] [negate: false] [operator: ends_with] [pattern: @example.com]
|
||||
- commit_message_pattern: [name: ] [negate: false] [operator: contains] [pattern: asdf]
|
||||
|
|
@ -212,14 +212,14 @@ func Test_viewRun(t *testing.T) {
|
|||
ID: 74
|
||||
Source: my-owner (Organization)
|
||||
Enforcement: Evaluate Mode (not enforced)
|
||||
|
||||
|
||||
Bypass List
|
||||
This ruleset cannot be bypassed
|
||||
|
||||
|
||||
Conditions
|
||||
- ref_name: [exclude: []] [include: [~ALL]]
|
||||
- repository_name: [exclude: []] [include: [~ALL]] [protected: true]
|
||||
|
||||
|
||||
Rules
|
||||
- commit_author_email_pattern: [name: ] [negate: false] [operator: ends_with] [pattern: @example.com]
|
||||
- commit_message_pattern: [name: ] [negate: false] [operator: contains] [pattern: asdf]
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ func NewCmdRerun(f *cmdutil.Factory, runF func(*RerunOptions) error) *cobra.Comm
|
|||
|
||||
However, this %[1]s<number>%[1]s should not be used with the %[1]s--job%[1]s flag and will result in the
|
||||
API returning %[1]s404 NOT FOUND%[1]s. Instead, you can get the correct job IDs using the following command:
|
||||
|
||||
|
||||
gh run view <run-id> --json jobs --jq '.jobs[] | {name, databaseId}'
|
||||
|
||||
You will need to use databaseId field for triggering job re-runs.
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@ func NewCmdCode(f *cmdutil.Factory, runF func(*CodeOptions) error) *cobra.Comman
|
|||
# search code matching "react" and "lifecycle"
|
||||
$ gh search code react lifecycle
|
||||
|
||||
# search code matching "error handling"
|
||||
# search code matching "error handling"
|
||||
$ gh search code "error handling"
|
||||
|
||||
|
||||
# search code matching "deque" in Python files
|
||||
$ gh search code deque --language=python
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue