From 3984919a3df95b8ec203bcb82b66c9c2270579c7 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sat, 12 Oct 2019 18:10:44 +0900 Subject: bridge: various cleanups --- misc/powershell_completion/git-bug | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'misc/powershell_completion') diff --git a/misc/powershell_completion/git-bug b/misc/powershell_completion/git-bug index 34037531..e875b8a2 100644 --- a/misc/powershell_completion/git-bug +++ b/misc/powershell_completion/git-bug @@ -22,6 +22,7 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { [CompletionResult]::new('commands', 'commands', [CompletionResultType]::ParameterValue, 'Display available commands.') [CompletionResult]::new('comment', 'comment', [CompletionResultType]::ParameterValue, 'Display or add comments to a bug.') [CompletionResult]::new('deselect', 'deselect', [CompletionResultType]::ParameterValue, 'Clear the implicitly selected bug.') + [CompletionResult]::new('export', 'export', [CompletionResultType]::ParameterValue, '') [CompletionResult]::new('label', 'label', [CompletionResultType]::ParameterValue, 'Display, add or remove labels to/from a bug.') [CompletionResult]::new('ls', 'ls', [CompletionResultType]::ParameterValue, 'List bugs.') [CompletionResult]::new('ls-id', 'ls-id', [CompletionResultType]::ParameterValue, 'List bug identifiers.') @@ -52,6 +53,7 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { [CompletionResult]::new('pull', 'pull', [CompletionResultType]::ParameterValue, 'Pull updates.') [CompletionResult]::new('push', 'push', [CompletionResultType]::ParameterValue, 'Push updates.') [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Delete a configured bridge.') + [CompletionResult]::new('token', 'token', [CompletionResultType]::ParameterValue, 'Configure and use bridge tokens.') break } 'git-bug;bridge;configure' { @@ -83,6 +85,29 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { 'git-bug;bridge;rm' { break } + 'git-bug;bridge;token' { + [CompletionResult]::new('-l', 'l', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('--local', 'local', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('-g', 'g', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('--global', 'global', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Configure and use bridge tokens.') + [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Configure and use bridge tokens.') + break + } + 'git-bug;bridge;token;add' { + [CompletionResult]::new('-g', 'g', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('--global', 'global', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('--value', 'value', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('--scopes', 'scopes', [CompletionResultType]::ParameterName, '') + break + } + 'git-bug;bridge;token;rm' { + break + } 'git-bug;commands' { [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Output the command description as well as Markdown compatible comment') [CompletionResult]::new('--pretty', 'pretty', [CompletionResultType]::ParameterName, 'Output the command description as well as Markdown compatible comment') @@ -102,6 +127,9 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { 'git-bug;deselect' { break } + 'git-bug;export' { + break + } 'git-bug;label' { [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Add a label to a bug.') [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Remove a label from a bug.') -- cgit From baefa687b582632cd9cc21b945bc074c833f5389 Mon Sep 17 00:00:00 2001 From: amine Date: Thu, 24 Oct 2019 20:16:51 +0200 Subject: tokens: use a hash as token identifier instead of the token it self --- misc/powershell_completion/git-bug | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'misc/powershell_completion') diff --git a/misc/powershell_completion/git-bug b/misc/powershell_completion/git-bug index e875b8a2..d92bc04b 100644 --- a/misc/powershell_completion/git-bug +++ b/misc/powershell_completion/git-bug @@ -22,7 +22,6 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { [CompletionResult]::new('commands', 'commands', [CompletionResultType]::ParameterValue, 'Display available commands.') [CompletionResult]::new('comment', 'comment', [CompletionResultType]::ParameterValue, 'Display or add comments to a bug.') [CompletionResult]::new('deselect', 'deselect', [CompletionResultType]::ParameterValue, 'Clear the implicitly selected bug.') - [CompletionResult]::new('export', 'export', [CompletionResultType]::ParameterValue, '') [CompletionResult]::new('label', 'label', [CompletionResultType]::ParameterValue, 'Display, add or remove labels to/from a bug.') [CompletionResult]::new('ls', 'ls', [CompletionResultType]::ParameterValue, 'List bugs.') [CompletionResult]::new('ls-id', 'ls-id', [CompletionResultType]::ParameterValue, 'List bug identifiers.') @@ -53,7 +52,7 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { [CompletionResult]::new('pull', 'pull', [CompletionResultType]::ParameterValue, 'Pull updates.') [CompletionResult]::new('push', 'push', [CompletionResultType]::ParameterValue, 'Push updates.') [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Delete a configured bridge.') - [CompletionResult]::new('token', 'token', [CompletionResultType]::ParameterValue, 'Configure and use bridge tokens.') + [CompletionResult]::new('token', 'token', [CompletionResultType]::ParameterValue, 'List all stored tokens.') break } 'git-bug;bridge;configure' { @@ -90,8 +89,8 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { [CompletionResult]::new('--local', 'local', [CompletionResultType]::ParameterName, '') [CompletionResult]::new('-g', 'g', [CompletionResultType]::ParameterName, '') [CompletionResult]::new('--global', 'global', [CompletionResultType]::ParameterName, '') - [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Configure and use bridge tokens.') - [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Configure and use bridge tokens.') + [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Create and store a new token') + [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Remove token by Id.') break } 'git-bug;bridge;token;add' { @@ -127,9 +126,6 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { 'git-bug;deselect' { break } - 'git-bug;export' { - break - } 'git-bug;label' { [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Add a label to a bug.') [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Remove a label from a bug.') -- cgit From 45653bd31d9ec91123ee42803cd5c46b43d18528 Mon Sep 17 00:00:00 2001 From: amine Date: Fri, 8 Nov 2019 14:55:27 +0100 Subject: token: regenerate documentation and fix imports --- misc/powershell_completion/git-bug | 4 ---- 1 file changed, 4 deletions(-) (limited to 'misc/powershell_completion') diff --git a/misc/powershell_completion/git-bug b/misc/powershell_completion/git-bug index d92bc04b..99265bbb 100644 --- a/misc/powershell_completion/git-bug +++ b/misc/powershell_completion/git-bug @@ -94,14 +94,10 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { break } 'git-bug;bridge;token;add' { - [CompletionResult]::new('-g', 'g', [CompletionResultType]::ParameterName, '') - [CompletionResult]::new('--global', 'global', [CompletionResultType]::ParameterName, '') [CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, '') [CompletionResult]::new('--value', 'value', [CompletionResultType]::ParameterName, '') [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, '') [CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, '') - [CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, '') - [CompletionResult]::new('--scopes', 'scopes', [CompletionResultType]::ParameterName, '') break } 'git-bug;bridge;token;rm' { -- cgit From e2445edcb99ed0aa7fcd40fe7484d71e73367334 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 10 Nov 2019 14:46:55 +0100 Subject: bridge: various improvement on the global token PR --- misc/powershell_completion/git-bug | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'misc/powershell_completion') diff --git a/misc/powershell_completion/git-bug b/misc/powershell_completion/git-bug index 99265bbb..094fa254 100644 --- a/misc/powershell_completion/git-bug +++ b/misc/powershell_completion/git-bug @@ -52,7 +52,7 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { [CompletionResult]::new('pull', 'pull', [CompletionResultType]::ParameterValue, 'Pull updates.') [CompletionResult]::new('push', 'push', [CompletionResultType]::ParameterValue, 'Push updates.') [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Delete a configured bridge.') - [CompletionResult]::new('token', 'token', [CompletionResultType]::ParameterValue, 'List all stored tokens.') + [CompletionResult]::new('token', 'token', [CompletionResultType]::ParameterValue, 'List all known tokens.') break } 'git-bug;bridge;configure' { @@ -85,19 +85,13 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { break } 'git-bug;bridge;token' { - [CompletionResult]::new('-l', 'l', [CompletionResultType]::ParameterName, '') - [CompletionResult]::new('--local', 'local', [CompletionResultType]::ParameterName, '') - [CompletionResult]::new('-g', 'g', [CompletionResultType]::ParameterName, '') - [CompletionResult]::new('--global', 'global', [CompletionResultType]::ParameterName, '') - [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Create and store a new token') + [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Store a new token') [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Remove token by Id.') break } 'git-bug;bridge;token;add' { - [CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, '') - [CompletionResult]::new('--value', 'value', [CompletionResultType]::ParameterName, '') - [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, '') - [CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, '') + [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'The target of the bridge. Valid values are [github,gitlab,launchpad-preview]') + [CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'The target of the bridge. Valid values are [github,gitlab,launchpad-preview]') break } 'git-bug;bridge;token;rm' { -- cgit From f8cf3fea035d7f0ad0287166c3a5016777acf5ad Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 10 Nov 2019 15:50:56 +0100 Subject: cli: add bridge token show --- misc/powershell_completion/git-bug | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'misc/powershell_completion') diff --git a/misc/powershell_completion/git-bug b/misc/powershell_completion/git-bug index 094fa254..6a7bf0c3 100644 --- a/misc/powershell_completion/git-bug +++ b/misc/powershell_completion/git-bug @@ -86,7 +86,8 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { } 'git-bug;bridge;token' { [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Store a new token') - [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Remove token by Id.') + [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Remove a token.') + [CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Display a token.') break } 'git-bug;bridge;token;add' { @@ -97,6 +98,9 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { 'git-bug;bridge;token;rm' { break } + 'git-bug;bridge;token;show' { + break + } 'git-bug;commands' { [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Output the command description as well as Markdown compatible comment') [CompletionResult]::new('--pretty', 'pretty', [CompletionResultType]::ParameterName, 'Output the command description as well as Markdown compatible comment') -- cgit From e0b15ee7644c20533156850e0be5a07597967450 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 10 Nov 2019 17:32:14 +0100 Subject: cli: rename "token" into "auth" --- misc/powershell_completion/git-bug | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'misc/powershell_completion') diff --git a/misc/powershell_completion/git-bug b/misc/powershell_completion/git-bug index 6a7bf0c3..5f043932 100644 --- a/misc/powershell_completion/git-bug +++ b/misc/powershell_completion/git-bug @@ -48,11 +48,28 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { break } 'git-bug;bridge' { + [CompletionResult]::new('auth', 'auth', [CompletionResultType]::ParameterValue, 'List all known bridge authentication credentials.') [CompletionResult]::new('configure', 'configure', [CompletionResultType]::ParameterValue, 'Configure a new bridge.') [CompletionResult]::new('pull', 'pull', [CompletionResultType]::ParameterValue, 'Pull updates.') [CompletionResult]::new('push', 'push', [CompletionResultType]::ParameterValue, 'Push updates.') [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Delete a configured bridge.') - [CompletionResult]::new('token', 'token', [CompletionResultType]::ParameterValue, 'List all known tokens.') + break + } + 'git-bug;bridge;auth' { + [CompletionResult]::new('add-token', 'add-token', [CompletionResultType]::ParameterValue, 'Store a new token') + [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Remove a credential.') + [CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Display an authentication credential.') + break + } + 'git-bug;bridge;auth;add-token' { + [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'The target of the bridge. Valid values are [github,gitlab,launchpad-preview]') + [CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'The target of the bridge. Valid values are [github,gitlab,launchpad-preview]') + break + } + 'git-bug;bridge;auth;rm' { + break + } + 'git-bug;bridge;auth;show' { break } 'git-bug;bridge;configure' { @@ -84,23 +101,6 @@ Register-ArgumentCompleter -Native -CommandName 'git-bug' -ScriptBlock { 'git-bug;bridge;rm' { break } - 'git-bug;bridge;token' { - [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Store a new token') - [CompletionResult]::new('rm', 'rm', [CompletionResultType]::ParameterValue, 'Remove a token.') - [CompletionResult]::new('show', 'show', [CompletionResultType]::ParameterValue, 'Display a token.') - break - } - 'git-bug;bridge;token;add' { - [CompletionResult]::new('-t', 't', [CompletionResultType]::ParameterName, 'The target of the bridge. Valid values are [github,gitlab,launchpad-preview]') - [CompletionResult]::new('--target', 'target', [CompletionResultType]::ParameterName, 'The target of the bridge. Valid values are [github,gitlab,launchpad-preview]') - break - } - 'git-bug;bridge;token;rm' { - break - } - 'git-bug;bridge;token;show' { - break - } 'git-bug;commands' { [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'Output the command description as well as Markdown compatible comment') [CompletionResult]::new('--pretty', 'pretty', [CompletionResultType]::ParameterName, 'Output the command description as well as Markdown compatible comment') -- cgit