Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions plugins/sourcegraph/access_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import (
func AccessToken() schema.CredentialType {
return schema.CredentialType{
Name: credname.AccessToken,
DocsURL: sdk.URL("https://docs.sourcegraph.com/cli"),
ManagementURL: sdk.URL("https://sourcegraph.com/user/settings/tokens"),
DocsURL: sdk.URL("https://sourcegraph.com/docs/cli"),
ManagementURL: sdk.URL("https://sourcegraph.com/settings/tokens"),
Fields: []schema.CredentialField{
{
Name: fieldname.Endpoint,
MarkdownDescription: "Base URL for your Sourcegraph instance.",
Secret: false,
Optional: true,
AlternativeNames: []string{"Website","URL"},
MarkdownDescription: "Base URL for your Sourcegraph instance. Should start with https://",
Composition: &schema.ValueComposition{
Prefix: "https://",
Charset: schema.Charset{
Lowercase: true,
Digits: true,
Expand All @@ -30,13 +30,16 @@ func AccessToken() schema.CredentialType {
},
{
Name: fieldname.Token,
MarkdownDescription: "Token used to authenticate to Sourcegraph.",
AlternativeNames: []string{"AccessToken"},
MarkdownDescription: "Access token used to authenticate to Sourcegraph. Should start with sgp_",
Secret: true,
Composition: &schema.ValueComposition{
Length: 40,
Length: 60,
Prefix: "sgp_",
Charset: schema.Charset{
Lowercase: true,
Digits: true,
Specific: []rune{'_'},
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/sourcegraph/src.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func SourcegraphCLI() schema.Executable {
return schema.Executable{
Name: "Sourcegraph CLI",
Runs: []string{"src"},
DocsURL: sdk.URL("https://docs.sourcegraph.com/cli"),
DocsURL: sdk.URL("https://sourcegraph.com/docs/cli"),
NeedsAuth: needsauth.IfAll(
needsauth.NotForHelpOrVersion(),
needsauth.NotWithoutArgs(),
Expand Down