Repository navigation
Document required token permissions for each bridge target #1632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,41 @@ func newBridgeNewCommand(env *execenv.Env) *cobra.Command { | |
| cmd := &cobra.Command{ | ||
| Use: "new", | ||
| Short: "Configure a new bridge", | ||
| Long: "Configure a new bridge by passing flags or/and using interactive terminal prompts. You can avoid all the terminal prompts by passing all the necessary flags to configure your bridge.", | ||
| Long: `Configure a new bridge by passing flags or/and using interactive terminal prompts. | ||
| You can avoid all the terminal prompts by passing all the necessary flags to configure your bridge. | ||
|
|
||
| Authentication tokens and required permissions by target: | ||
|
|
||
| GitHub: | ||
| Requires a classic personal access token (https://github.com/settings/tokens; | ||
| fine-grained tokens starting with 'github_pat_' are not supported). | ||
| Required scopes: | ||
| - 'public_repo' for public repositories | ||
| - 'repo' for private repositories | ||
| No other scope (code, branches, pull request) is needed or used. | ||
|
|
||
| GitLab: | ||
| Requires a personal access token created on the target GitLab instance | ||
| ($BASE_URL/-/user_settings/personal_access_tokens). | ||
| Required scopes: | ||
| - 'api' (read/write) to import issues and push changes (issues, | ||
| comments, labels, status). 'read_api' is enough if you only pull. | ||
| - Read access to the project (at least 'Reporter' role, or public | ||
| visibility) is required, and at least 'Developer' role to push. | ||
|
|
||
| Jira: | ||
| Authenticates with your user account, so the account itself must have | ||
| permission to view the project and to create, comment on, edit and | ||
| transition issues. | ||
| - Jira Cloud: an API token generated at | ||
| https://id.atlassian.com/manage-profile/security/api-tokens | ||
| (sent along with your username). | ||
| - Jira Data Center / Server: a username and password (session | ||
| authentication), or an API token. | ||
|
|
||
| Launchpad: | ||
| No token required: the Launchpad bridge is read-only and currently uses | ||
| the public Launchpad API without any authentication.`, | ||
| Example: `# Interactive example | ||
| [1]: github | ||
| [2]: gitlab | ||
|
|
@@ -69,22 +103,31 @@ Successfully configured bridge: default | |
| git bug bridge new \ | ||
| --name=default \ | ||
| --target=github \ | ||
| --owner=example-owner | ||
| --owner=example-owner \ | ||
| --project=example-repo \ | ||
| --token=$TOKEN | ||
|
|
||
| # For Launchpad | ||
| # For GitLab | ||
| git bug bridge new \ | ||
| --name=default \ | ||
| --target=launchpad-preview \ | ||
| --url=https://bugs.launchpad.net/ubuntu/ | ||
| --target=gitlab \ | ||
| --url=https://gitlab.example.com/example-org/example-repo \ | ||
| --token=$TOKEN | ||
|
|
||
| # For Gitlab | ||
| # For Jira | ||
| git bug bridge new \ | ||
| --name=default \ | ||
| --target=gitlab \ | ||
| --url=https://github.com/example-org/example-repo \ | ||
| --token=$TOKEN`, | ||
| --target=jira \ | ||
| --base-url=https://jira.example.com \ | ||
| --project=PROJ \ | ||
| [email protected] \ | ||
| --token=$TOKEN | ||
|
|
||
| # For Launchpad | ||
| git bug bridge new \ | ||
| --name=default \ | ||
| --target=launchpad-preview \ | ||
| --url=https://bugs.launchpad.net/ubuntu/`, | ||
| PreRunE: execenv.LoadBackend(env), | ||
| RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error { | ||
| return runBridgeNew(env, options) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,46 @@ git-bug-bridge-new - Configure a new bridge | |
|
|
||
|
|
||
| .SH DESCRIPTION | ||
| Configure a new bridge by passing flags or/and using interactive terminal prompts. You can avoid all the terminal prompts by passing all the necessary flags to configure your bridge. | ||
| Configure a new bridge by passing flags or/and using interactive terminal prompts. | ||
| You can avoid all the terminal prompts by passing all the necessary flags to configure your bridge. | ||
|
|
||
| .PP | ||
| Authentication tokens and required permissions by target: | ||
|
|
||
| .PP | ||
| GitHub: | ||
| Requires a classic personal access token (https://github.com/settings/tokens; | ||
| fine-grained tokens starting with 'github\fIpat\fP\&' are not supported). | ||
| Required scopes: | ||
| - 'public_repo' for public repositories | ||
| - 'repo' for private repositories | ||
| No other scope (code, branches, pull request) is needed or used. | ||
|
|
||
| .PP | ||
| GitLab: | ||
| Requires a personal access token created on the target GitLab instance | ||
| ($BASE_URL/-/user_settings/personal_access_tokens). | ||
| Required scopes: | ||
| - 'api' (read/write) to import issues and push changes (issues, | ||
| comments, labels, status). 'read_api' is enough if you only pull. | ||
| - Read access to the project (at least 'Reporter' role, or public | ||
| visibility) is required, and at least 'Developer' role to push. | ||
|
|
||
| .PP | ||
| Jira: | ||
| Authenticates with your user account, so the account itself must have | ||
| permission to view the project and to create, comment on, edit and | ||
| transition issues. | ||
| - Jira Cloud: an API token generated at | ||
| https://id.atlassian.com/manage-profile/security/api-tokens | ||
| (sent along with your username). | ||
| - Jira Data Center / Server: a username and password (session | ||
| authentication), or an API token. | ||
|
|
||
| .PP | ||
| Launchpad: | ||
| No token required: the Launchpad bridge is read-only and currently uses | ||
| the public Launchpad API without any authentication. | ||
|
|
||
|
|
||
| .SH OPTIONS | ||
|
|
@@ -100,22 +139,31 @@ Successfully configured bridge: default | |
| git bug bridge new \\ | ||
| --name=default \\ | ||
| --target=github \\ | ||
| --owner=example-owner | ||
| --owner=example-owner \\ | ||
| --project=example-repo \\ | ||
| --token=$TOKEN | ||
|
|
||
| # For Launchpad | ||
| # For GitLab | ||
| git bug bridge new \\ | ||
| --name=default \\ | ||
| --target=launchpad-preview \\ | ||
| --url=https://bugs.launchpad.net/ubuntu/ | ||
| --target=gitlab \\ | ||
| --url=https://gitlab.example.com/example-org/example-repo \\ | ||
| --token=$TOKEN | ||
|
|
||
| # For Gitlab | ||
| # For Jira | ||
| git bug bridge new \\ | ||
| --name=default \\ | ||
| --target=gitlab \\ | ||
| --url=https://github.com/example-org/example-repo \\ | ||
| --target=jira \\ | ||
| --base-url=https://jira.example.com \\ | ||
| --project=PROJ \\ | ||
| [email protected] \\ | ||
| --token=$TOKEN | ||
|
|
||
| # For Launchpad | ||
| git bug bridge new \\ | ||
| --name=default \\ | ||
| --target=launchpad-preview \\ | ||
| --url=https://bugs.launchpad.net/ubuntu/ | ||
| .EE | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,41 @@ Configure a new bridge | |
|
|
||
| ### Synopsis | ||
|
|
||
| Configure a new bridge by passing flags or/and using interactive terminal prompts. You can avoid all the terminal prompts by passing all the necessary flags to configure your bridge. | ||
| Configure a new bridge by passing flags or/and using interactive terminal prompts. | ||
| You can avoid all the terminal prompts by passing all the necessary flags to configure your bridge. | ||
|
|
||
| Authentication tokens and required permissions by target: | ||
|
|
||
| GitHub: | ||
| Requires a classic personal access token (https://github.com/settings/tokens; | ||
| fine-grained tokens starting with 'github_pat_' are not supported). | ||
| Required scopes: | ||
| - 'public_repo' for public repositories | ||
| - 'repo' for private repositories | ||
| No other scope (code, branches, pull request) is needed or used. | ||
|
|
||
| GitLab: | ||
| Requires a personal access token created on the target GitLab instance | ||
| ($BASE_URL/-/user_settings/personal_access_tokens). | ||
| Required scopes: | ||
| - 'api' (read/write) to import issues and push changes (issues, | ||
| comments, labels, status). 'read_api' is enough if you only pull. | ||
| - Read access to the project (at least 'Reporter' role, or public | ||
| visibility) is required, and at least 'Developer' role to push. | ||
|
|
||
| Jira: | ||
| Authenticates with your user account, so the account itself must have | ||
| permission to view the project and to create, comment on, edit and | ||
| transition issues. | ||
| - Jira Cloud: an API token generated at | ||
| https://id.atlassian.com/manage-profile/security/api-tokens | ||
| (sent along with your username). | ||
| - Jira Data Center / Server: a username and password (session | ||
| authentication), or an API token. | ||
|
|
||
| Launchpad: | ||
| No token required: the Launchpad bridge is read-only and currently uses | ||
| the public Launchpad API without any authentication. | ||
|
|
||
| ``` | ||
| git-bug bridge new [flags] | ||
|
|
@@ -49,22 +83,31 @@ Successfully configured bridge: default | |
| git bug bridge new \ | ||
| --name=default \ | ||
| --target=github \ | ||
| --owner=example-owner | ||
| --owner=example-owner \ | ||
| --project=example-repo \ | ||
| --token=$TOKEN | ||
|
|
||
| # For Launchpad | ||
| # For GitLab | ||
| git bug bridge new \ | ||
| --name=default \ | ||
| --target=launchpad-preview \ | ||
| --url=https://bugs.launchpad.net/ubuntu/ | ||
| --target=gitlab \ | ||
| --url=https://gitlab.example.com/example-org/example-repo \ | ||
| --token=$TOKEN | ||
|
|
||
| # For Gitlab | ||
| # For Jira | ||
| git bug bridge new \ | ||
| --name=default \ | ||
| --target=gitlab \ | ||
| --url=https://github.com/example-org/example-repo \ | ||
| --target=jira \ | ||
| --base-url=https://jira.example.com \ | ||
| --project=PROJ \ | ||
| [email protected] \ | ||
| --token=$TOKEN | ||
|
|
||
| # For Launchpad | ||
| git bug bridge new \ | ||
| --name=default \ | ||
| --target=launchpad-preview \ | ||
| --url=https://bugs.launchpad.net/ubuntu/ | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.