-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from ConductorOne/lauren/ticket-settings-enabled
Upgrade baton-sdk version to v0.2.8/set ticketing enabled
- Loading branch information
Showing
45 changed files
with
2,041 additions
and
1,475 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,26 +1,16 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"errors" | ||
|
||
"github.com/conductorone/baton-sdk/pkg/cli" | ||
"github.com/conductorone/baton-sdk/pkg/field" | ||
) | ||
|
||
// config defines the external configuration required for the connector to run. | ||
type config struct { | ||
cli.BaseConfig `mapstructure:",squash"` // Puts the base config options in the same place as the connector options | ||
InstanceURL string `mapstructure:"instance-url" description:"The URL that Jira is hosted at. Example: \"https://localhost:8080\""` | ||
AccessToken string `mapstructure:"access-token" description:"The Jira personal access token to authenticate with."` | ||
} | ||
var ( | ||
instanceURLField = field.StringField("instance-url", field.WithRequired(true), field.WithDescription(`The URL that Jira is hosted at. Example: "https://localhost:8080"`)) | ||
accessTokenField = field.StringField("access-token", field.WithRequired(true), field.WithDescription("The Jira personal access token to authenticate with.")) | ||
) | ||
|
||
// validateConfig is run after the configuration is loaded, and should return an error if it isn't valid. | ||
func validateConfig(ctx context.Context, cfg *config) error { | ||
if cfg.InstanceURL == "" { | ||
return errors.New("--instance-url is required") | ||
} | ||
if cfg.AccessToken == "" { | ||
return errors.New("--access-token is required") | ||
} | ||
return nil | ||
// configurationFields defines the external configuration required for the connector to run. | ||
var configurationFields = []field.SchemaField{ | ||
instanceURLField, | ||
accessTokenField, | ||
} |
This file contains 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 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 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
148 changes: 148 additions & 0 deletions
148
vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.