Documentation ¶
Overview ¶
Package github provides the ability for Vela to integrate with GitHub or GitHub Enterprise as a scm provider.
Usage:
import "github.com/go-vela/server/scm/github"
Index ¶
- func New(opts ...ClientOpt) (*client, error)
- func NewTest(urls ...string) (*client, error)
- type ClientOpt
- func WithAddress(address string) ClientOpt
- func WithClientID(id string) ClientOpt
- func WithClientSecret(secret string) ClientOpt
- func WithScopes(scopes []string) ClientOpt
- func WithServerAddress(address string) ClientOpt
- func WithServerWebhookAddress(address string) ClientOpt
- func WithStatusContext(context string) ClientOpt
- func WithWebUIAddress(address string) ClientOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientOpt ¶
type ClientOpt func(*client) error
ClientOpt represents a configuration option to initialize the scm client for GitHub.
func WithAddress ¶
WithAddress sets the GitHub address in the scm client for GitHub.
func WithClientID ¶
WithClientID sets the OAuth client ID in the scm client for GitHub.
func WithClientSecret ¶
WithClientSecret sets the OAuth client secret in the scm client for GitHub.
func WithScopes ¶
WithScopes sets the OAuth scopes in the scm client for GitHub.
func WithServerAddress ¶
WithServerAddress sets the Vela server address in the scm client for GitHub.
func WithServerWebhookAddress ¶
WithServerWebhookAddress sets the Vela server webhook address in the scm client for GitHub.
func WithStatusContext ¶
WithStatusContext sets the context for commit statuses in the scm client for GitHub.
func WithWebUIAddress ¶
WithWebUIAddress sets the Vela web UI address in the scm client for GitHub.