Documentation
¶
Index ¶
- Constants
- func IsRepositoryNotFoundError(err error) bool
- func NewRepositoryNotFoundError(err error) error
- type AzureDevOpsClientFactory
- type AzureDevOpsService
- type BitbucketCloudPullRequest
- type BitbucketCloudPullRequestAuthor
- type BitbucketCloudPullRequestDestination
- type BitbucketCloudPullRequestDestinationBranch
- type BitbucketCloudPullRequestSource
- type BitbucketCloudPullRequestSourceBranch
- type BitbucketCloudPullRequestSourceCommit
- type BitbucketCloudService
- type BitbucketService
- type FakeService
- type Filter
- type GitLabService
- type GiteaService
- type GithubService
- type PullRequest
- type PullRequestResponse
- type PullRequestService
- func NewAzureDevOpsService(token, url, organization, project, repo string, labels []string) (PullRequestService, error)
- func NewBitbucketCloudServiceBasicAuth(baseURL, username, password, owner, repositorySlug string) (PullRequestService, error)
- func NewBitbucketCloudServiceBearerToken(baseURL, bearerToken, owner, repositorySlug string) (PullRequestService, error)
- func NewBitbucketCloudServiceNoAuth(baseURL, owner, repositorySlug string) (PullRequestService, error)
- func NewBitbucketServiceBasicAuth(ctx context.Context, ...) (PullRequestService, error)
- func NewBitbucketServiceBearerToken(ctx context.Context, bearerToken, url, projectKey, repositorySlug string, ...) (PullRequestService, error)
- func NewBitbucketServiceNoAuth(ctx context.Context, url, projectKey, repositorySlug string, ...) (PullRequestService, error)
- func NewFakeService(_ context.Context, listPullReuests []*PullRequest, listError error) (PullRequestService, error)
- func NewGitLabService(token, url, project string, labels []string, pullRequestState string, ...) (PullRequestService, error)
- func NewGiteaService(token, url, owner, repo string, labels []string, insecure bool) (PullRequestService, error)
- func NewGithubAppService(g github_app_auth.Authentication, url, owner, repo string, labels []string, ...) (PullRequestService, error)
- func NewGithubService(token, url, owner, repo string, labels []string, ...) (PullRequestService, error)
- type RepositoryNotFoundError
Constants ¶
View Source
const ( AZURE_DEVOPS_DEFAULT_URL = "https://dev.azure.com" AZURE_DEVOPS_PROJECT_NOT_FOUND_ERROR = "The following project does not exist" )
Variables ¶
This section is empty.
Functions ¶
func IsRepositoryNotFoundError ¶ added in v3.2.0
IsRepositoryNotFoundError checks if the given error is a repository not found error
func NewRepositoryNotFoundError ¶ added in v3.2.0
NewRepositoryNotFoundError creates a new repository not found error
Types ¶
type AzureDevOpsService ¶
type AzureDevOpsService struct {
// contains filtered or unexported fields
}
func (*AzureDevOpsService) List ¶
func (a *AzureDevOpsService) List(ctx context.Context) ([]*PullRequest, error)
type BitbucketCloudPullRequest ¶
type BitbucketCloudPullRequest struct {
ID int `json:"id"`
Title string `json:"title"`
Source BitbucketCloudPullRequestSource `json:"source"`
Author BitbucketCloudPullRequestAuthor `json:"author"`
Destination BitbucketCloudPullRequestDestination `json:"destination"`
}
type BitbucketCloudPullRequestAuthor ¶
type BitbucketCloudPullRequestAuthor struct {
Nickname string `json:"nickname"`
}
Also have display_name and uuid, but don't plan to use them.
type BitbucketCloudPullRequestDestination ¶ added in v3.1.0
type BitbucketCloudPullRequestDestination struct {
Branch BitbucketCloudPullRequestDestinationBranch `json:"branch"`
}
type BitbucketCloudPullRequestDestinationBranch ¶ added in v3.1.0
type BitbucketCloudPullRequestDestinationBranch struct {
Name string `json:"name"`
}
type BitbucketCloudPullRequestSource ¶
type BitbucketCloudPullRequestSource struct {
Branch BitbucketCloudPullRequestSourceBranch `json:"branch"`
Commit BitbucketCloudPullRequestSourceCommit `json:"commit"`
}
type BitbucketCloudPullRequestSourceBranch ¶
type BitbucketCloudPullRequestSourceBranch struct {
Name string `json:"name"`
}
type BitbucketCloudPullRequestSourceCommit ¶
type BitbucketCloudPullRequestSourceCommit struct {
Hash string `json:"hash"`
}
type BitbucketCloudService ¶
type BitbucketCloudService struct {
// contains filtered or unexported fields
}
func (*BitbucketCloudService) List ¶
func (b *BitbucketCloudService) List(_ context.Context) ([]*PullRequest, error)
type BitbucketService ¶
type BitbucketService struct {
// contains filtered or unexported fields
}
func (*BitbucketService) List ¶
func (b *BitbucketService) List(_ context.Context) ([]*PullRequest, error)
type FakeService ¶
type FakeService struct {
// contains filtered or unexported fields
}
func (*FakeService) List ¶
func (g *FakeService) List(_ context.Context) ([]*PullRequest, error)
type GitLabService ¶
type GitLabService struct {
// contains filtered or unexported fields
}
func (*GitLabService) List ¶
func (g *GitLabService) List(ctx context.Context) ([]*PullRequest, error)
type GiteaService ¶
type GiteaService struct {
// contains filtered or unexported fields
}
func (*GiteaService) List ¶
func (g *GiteaService) List(ctx context.Context) ([]*PullRequest, error)
type GithubService ¶
type GithubService struct {
// contains filtered or unexported fields
}
func (*GithubService) List ¶
func (g *GithubService) List(ctx context.Context) ([]*PullRequest, error)
type PullRequest ¶
type PullRequest struct {
// Number is a number that will be the ID of the pull request.
Number int
// Title of the pull request.
Title string
// Branch is the name of the branch from which the pull request originated.
Branch string
// TargetBranch is the name of the target branch of the pull request.
TargetBranch string
// HeadSHA is the SHA of the HEAD from which the pull request originated.
HeadSHA string
// Labels of the pull request.
Labels []string
// Author is the author of the pull request.
Author string
}
func ListPullRequests ¶
func ListPullRequests(ctx context.Context, provider PullRequestService, filters []argoprojiov1alpha1.PullRequestGeneratorFilter) ([]*PullRequest, error)
type PullRequestResponse ¶
type PullRequestService ¶
type PullRequestService interface {
// List gets a list of pull requests.
List(ctx context.Context) ([]*PullRequest, error)
}
func NewAzureDevOpsService ¶
func NewAzureDevOpsService(token, url, organization, project, repo string, labels []string) (PullRequestService, error)
func NewBitbucketCloudServiceBasicAuth ¶
func NewBitbucketCloudServiceBasicAuth(baseURL, username, password, owner, repositorySlug string) (PullRequestService, error)
func NewBitbucketCloudServiceBearerToken ¶
func NewBitbucketCloudServiceBearerToken(baseURL, bearerToken, owner, repositorySlug string) (PullRequestService, error)
func NewBitbucketCloudServiceNoAuth ¶
func NewBitbucketCloudServiceNoAuth(baseURL, owner, repositorySlug string) (PullRequestService, error)
func NewFakeService ¶
func NewFakeService(_ context.Context, listPullReuests []*PullRequest, listError error) (PullRequestService, error)
func NewGitLabService ¶
func NewGiteaService ¶
func NewGiteaService(token, url, owner, repo string, labels []string, insecure bool) (PullRequestService, error)
func NewGithubAppService ¶
func NewGithubAppService(g github_app_auth.Authentication, url, owner, repo string, labels []string, optionalHTTPClient ...*http.Client) (PullRequestService, error)
func NewGithubService ¶
type RepositoryNotFoundError ¶ added in v3.2.0
type RepositoryNotFoundError struct {
// contains filtered or unexported fields
}
RepositoryNotFoundError represents an error when a repository is not found by a pull request provider
func (*RepositoryNotFoundError) Error ¶ added in v3.2.0
func (e *RepositoryNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.