From 8b7fb231ec1414cde5e8b8164fab14254f73d55f Mon Sep 17 00:00:00 2001 From: Azeem Sajid Date: Thu, 13 Feb 2025 11:06:27 +0500 Subject: [PATCH] Remove trailing whitespace --- pkg/cmd/actions/actions.go | 14 +++++++------- pkg/cmd/auth/login/login.go | 2 +- pkg/cmd/codespace/rebuild.go | 2 +- pkg/cmd/codespace/ssh.go | 6 +++--- pkg/cmd/codespace/view.go | 2 +- pkg/cmd/completion/completion.go | 6 +++--- pkg/cmd/gist/list/list_test.go | 10 +++++----- pkg/cmd/label/list_test.go | 2 +- pkg/cmd/pr/close/close.go | 2 +- pkg/cmd/pr/close/close_test.go | 2 +- pkg/cmd/project/item-edit/item_edit.go | 2 +- pkg/cmd/release/create/create.go | 2 +- pkg/cmd/release/view/view_test.go | 16 ++++++++-------- pkg/cmd/repo/delete/delete.go | 4 ++-- pkg/cmd/repo/deploy-key/add/add.go | 2 +- pkg/cmd/repo/gitignore/view/view.go | 2 +- pkg/cmd/repo/license/list/list.go | 2 +- pkg/cmd/repo/license/view/view_test.go | 2 +- pkg/cmd/repo/rename/rename.go | 6 +++--- pkg/cmd/ruleset/list/list.go | 2 +- pkg/cmd/ruleset/view/view.go | 2 +- pkg/cmd/ruleset/view/view_test.go | 12 ++++++------ pkg/cmd/run/rerun/rerun.go | 2 +- pkg/cmd/search/code/code.go | 4 ++-- 24 files changed, 54 insertions(+), 54 deletions(-) diff --git a/pkg/cmd/actions/actions.go b/pkg/cmd/actions/actions.go index 663866844..76d72b954 100644 --- a/pkg/cmd/actions/actions.go +++ b/pkg/cmd/actions/actions.go @@ -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 %[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 %[1]s diff --git a/pkg/cmd/auth/login/login.go b/pkg/cmd/auth/login/login.go index 347fcdb6a..95e32b799 100644 --- a/pkg/cmd/auth/login/login.go +++ b/pkg/cmd/auth/login/login.go @@ -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 diff --git a/pkg/cmd/codespace/rebuild.go b/pkg/cmd/codespace/rebuild.go index 565406edc..8566c2211 100644 --- a/pkg/cmd/codespace/rebuild.go +++ b/pkg/cmd/codespace/rebuild.go @@ -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. `), diff --git a/pkg/cmd/codespace/ssh.go b/pkg/cmd/codespace/ssh.go index b79ec68c9..70e7ceb42 100644 --- a/pkg/cmd/codespace/ssh.go +++ b/pkg/cmd/codespace/ssh.go @@ -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 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(` diff --git a/pkg/cmd/codespace/view.go b/pkg/cmd/codespace/view.go index e212f0820..205d54673 100644 --- a/pkg/cmd/codespace/view.go +++ b/pkg/cmd/codespace/view.go @@ -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 diff --git a/pkg/cmd/completion/completion.go b/pkg/cmd/completion/completion.go index d83dd31ef..b34bf7abf 100644 --- a/pkg/cmd/completion/completion.go +++ b/pkg/cmd/completion/completion.go @@ -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) diff --git a/pkg/cmd/gist/list/list_test.go b/pkg/cmd/gist/list/list_test.go index e6cb35d53..0acfae109 100644 --- a/pkg/cmd/gist/list/list_test.go +++ b/pkg/cmd/gist/list/list_test.go @@ -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"), }, } diff --git a/pkg/cmd/label/list_test.go b/pkg/cmd/label/list_test.go index 6f066da32..8a1bc7c7a 100644 --- a/pkg/cmd/label/list_test.go +++ b/pkg/cmd/label/list_test.go @@ -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 diff --git a/pkg/cmd/pr/close/close.go b/pkg/cmd/pr/close/close.go index ec5132377..063501ef7 100644 --- a/pkg/cmd/pr/close/close.go +++ b/pkg/cmd/pr/close/close.go @@ -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()) } } diff --git a/pkg/cmd/pr/close/close_test.go b/pkg/cmd/pr/close/close_test.go index f957581f8..959af0e04 100644 --- a/pkg/cmd/pr/close/close_test.go +++ b/pkg/cmd/pr/close/close_test.go @@ -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()) } diff --git a/pkg/cmd/project/item-edit/item_edit.go b/pkg/cmd/project/item-edit/item_edit.go index 657af1f54..c4acaaea9 100644 --- a/pkg/cmd/project/item-edit/item_edit.go +++ b/pkg/cmd/project/item-edit/item_edit.go @@ -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. diff --git a/pkg/cmd/release/create/create.go b/pkg/cmd/release/create/create.go index 8e77546d0..6da461a88 100644 --- a/pkg/cmd/release/create/create.go +++ b/pkg/cmd/release/create/create.go @@ -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 diff --git a/pkg/cmd/release/view/view_test.go b/pkg/cmd/release/view/view_test.go index 6fc747f69..1fed0fdc8 100644 --- a/pkg/cmd/release/view/view_test.go +++ b/pkg/cmd/release/view/view_test.go @@ -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: ``, diff --git a/pkg/cmd/repo/delete/delete.go b/pkg/cmd/repo/delete/delete.go index 7c6476f1d..50df0ddac 100644 --- a/pkg/cmd/repo/delete/delete.go +++ b/pkg/cmd/repo/delete/delete.go @@ -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), diff --git a/pkg/cmd/repo/deploy-key/add/add.go b/pkg/cmd/repo/deploy-key/add/add.go index 473d42498..dbac7dcfb 100644 --- a/pkg/cmd/repo/deploy-key/add/add.go +++ b/pkg/cmd/repo/deploy-key/add/add.go @@ -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. diff --git a/pkg/cmd/repo/gitignore/view/view.go b/pkg/cmd/repo/gitignore/view/view.go index 46e674632..b22f94ed9 100644 --- a/pkg/cmd/repo/gitignore/view/view.go +++ b/pkg/cmd/repo/gitignore/view/view.go @@ -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