Documentation
¶
Index ¶
- type AccessToken
- type Authenticator
- type BasicAuth
- type BitbucketCLI
- func (b BitbucketCLI) GetReviewers(revList string) []bitbucketv1.UserWithMetadata
- func (b *BitbucketCLI) RunPRCmd(cmd *PrCmd)
- func (b *BitbucketCLI) RunPRListCmd(cmd *PrListCmd)
- func (b *BitbucketCLI) RunProjectCmd(cmd *ProjectCmd)
- func (b *BitbucketCLI) RunRepoCmd(cmd *RepoCmd)
- func (b *BitbucketCLI) SetLogger(logger *logrus.Logger)
- type BranchCmd
- type Config
- type PrCmd
- type PrListCmd
- type ProjectCloneCmd
- type ProjectCmd
- type ProjectListCmd
- type RepoBranchCompareCmd
- type RepoBranchListCmd
- type RepoCmd
- type RepoPrApproveCmd
- type RepoPrCmd
- type RepoPrCreateCmd
- type RepoPrListCmd
- type RepoPrMergeCmd
- type ScanResult
- type SecurityCmd
- type SecurityResultCmd
- type SecurityScanCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
func (AccessToken) AddHeaders ¶
func (a AccessToken) AddHeaders(req *http.Request)
func (AccessToken) GetCloneCredentials ¶
func (a AccessToken) GetCloneCredentials() git_http.BasicAuth
func (AccessToken) GetContext ¶
func (a AccessToken) GetContext(ctx context.Context) context.Context
type Authenticator ¶
type BitbucketCLI ¶
type BitbucketCLI struct {
// contains filtered or unexported fields
}
func NewCLI ¶
func NewCLI(auth Authenticator, restURL string) (*BitbucketCLI, error)
func (BitbucketCLI) GetReviewers ¶
func (b BitbucketCLI) GetReviewers(revList string) []bitbucketv1.UserWithMetadata
func (*BitbucketCLI) RunPRCmd ¶
func (b *BitbucketCLI) RunPRCmd(cmd *PrCmd)
func (*BitbucketCLI) RunPRListCmd ¶
func (b *BitbucketCLI) RunPRListCmd(cmd *PrListCmd)
func (*BitbucketCLI) RunProjectCmd ¶
func (b *BitbucketCLI) RunProjectCmd(cmd *ProjectCmd)
func (*BitbucketCLI) RunRepoCmd ¶
func (b *BitbucketCLI) RunRepoCmd(cmd *RepoCmd)
func (*BitbucketCLI) SetLogger ¶
func (b *BitbucketCLI) SetLogger(logger *logrus.Logger)
type BranchCmd ¶
type BranchCmd struct {
Compare *RepoBranchCompareCmd `arg:"subcommand:compare"`
List *RepoBranchListCmd `arg:"subcommand:list"`
}
type ProjectCloneCmd ¶
type ProjectCmd ¶
type ProjectCmd struct {
Key string `arg:"-k,required"`
List *ProjectListCmd `arg:"subcommand:list"`
Clone *ProjectCloneCmd `arg:"subcommand:clone"`
}
type ProjectListCmd ¶
type ProjectListCmd struct {
}
type RepoBranchCompareCmd ¶
type RepoBranchCompareCmd struct {
FromBranch string `arg:"-f,--from,required" help:"Name of the branch to be used as base"`
ToBranch string `arg:"-t,--to" help:"Name of the branch to be compared to the base"`
Count bool `arg:"-c,--count" help:"Just output the number of commits between to and from branch"`
}
type RepoBranchListCmd ¶
type RepoCmd ¶
type RepoCmd struct {
ProjectKey string `arg:"-k,--key,required,env:BITBUCKET_PROJECT" help:"Project AccessToken (e.g: TOOL)"`
Slug string `arg:"-n,--name,required,env:BITBUCKET_REPO" help:"Slug of the repository"`
PrCmd *RepoPrCmd `arg:"subcommand:pr"`
BranchCmd *BranchCmd `arg:"subcommand:branch"`
SecurityCmd *SecurityCmd `arg:"subcommand:security"`
}
type RepoPrApproveCmd ¶
type RepoPrApproveCmd struct {
Id int64 `arg:"-i,--id" help:"id of the PR"`
}
type RepoPrCmd ¶
type RepoPrCmd struct {
Approve *RepoPrApproveCmd `arg:"subcommand:approve"`
Create *RepoPrCreateCmd `arg:"subcommand:create"`
List *RepoPrListCmd `arg:"subcommand:list"`
Merge *RepoPrMergeCmd `arg:"subcommand:merge"`
}
type RepoPrCreateCmd ¶
type RepoPrCreateCmd struct {
Title string `arg:"-t,--title,required" help:"Title of this PR"`
Description string `arg:"-d,--description" help:"Description of the PR"`
FromRef string `arg:"-F,--from-ref,required" help:"Reference of the incoming PR, e.g: refs/heads/feature-ABC-123"` // e.g: refs/heads/feature-ABC-123
ToRef string `arg:"-T,--to-ref,required" help:"Target reference, e.g: refs/heads/master"`
// From which repo? Defaults to self
FromRepoKey string `arg:"-K,--from-key" help:"Project AccessToken of the \"from\" repository"`
FromRepoSlug string `arg:"-S,--from-slug" help:"Repository slug of the \"from\" repository"`
Reviewers string `arg:"-r,--reviewers,env:BITBUCKET_REVIEWERS" help:"Comma separated list of reviewers"`
}
type RepoPrListCmd ¶
type RepoPrListCmd struct {
State string `arg:"-s,--state,env:BITBUCKET_LIST" help:"PR State, any of: ALL, OPEN, DECLINED, MERGED"`
}
type RepoPrMergeCmd ¶
type RepoPrMergeCmd struct {
Id int `arg:"-i,--id" help:"id of the PR"`
}
type ScanResult ¶
type SecurityCmd ¶
type SecurityCmd struct {
Scan *SecurityScanCmd `arg:"subcommand:scan"`
Result *SecurityResultCmd `arg:"subcommand:result"`
}
type SecurityResultCmd ¶
type SecurityResultCmd struct{}
type SecurityScanCmd ¶
type SecurityScanCmd struct{}
Source Files
¶
- auth.go
- cli.go
- client.go
- config.go
- const.go
- pr.go
- pr_list.go
- project.go
- project_clone.go
- project_list.go
- repo.go
- repo_branch.go
- repo_branch_compare.go
- repo_branch_list.go
- repo_pr.go
- repo_pr_approve.go
- repo_pr_create.go
- repo_pr_list.go
- repo_pr_merge.go
- repo_security.go
- repo_security_result.go
- repo_security_scan.go
- util.go
Click to show internal directories.
Click to hide internal directories.