Documentation ¶
Index ¶
- type AzureDevOps
- func (a *AzureDevOps) AbandonPullRequest(projectName string, repositoryName string, pullRequestId int) (*git.GitPullRequest, error)
- func (a *AzureDevOps) CreateBuildDefinition(projectName string, definitionName string, repositoryId string, ...) (*build.BuildDefinition, error)
- func (a *AzureDevOps) CreatePullRequest(projectName string, repositoryName string, sourceRefName string, ...) (*git.GitPullRequest, error)
- func (a *AzureDevOps) CreateWikiIfNotExists(projectName string, wikiName string, gitEmail string, gitUsername string) (*wiki.WikiV2, *git.GitRepository, error)
- func (a *AzureDevOps) FindPullRequest(projectName string, repositoryName string, sourceRefName string, ...) (*git.GitPullRequest, error)
- func (a *AzureDevOps) GetBuild(projectName string, buildId int) (*build.Build, error)
- func (a *AzureDevOps) GetBuildDefinitionByName(projectName string, definitionName string) (*build.BuildDefinition, error)
- func (a *AzureDevOps) GetFileContent(projectName string, repoName string, version string, filepath string, ...) (*git.GitItem, error)
- func (a *AzureDevOps) GetIdentityId() (*uuid.UUID, error)
- func (a *AzureDevOps) GetOrCreateBuildDefinition(projectName string, definitionName string, repositoryId string, ...) (*build.BuildDefinition, error)
- func (a *AzureDevOps) GetPAT() (*string, error)
- func (a *AzureDevOps) GetPackageVersion(projectName string, feedName string) (*[]feed.Package, error)
- func (a *AzureDevOps) GetRepositories(projectName string) (*[]git.GitRepository, error)
- func (a *AzureDevOps) GetRepository(projectName string, name string) (*git.GitRepository, error)
- func (a *AzureDevOps) QueueBuild(projectName string, definitionId int, sourceBranch string, ...) (*build.Build, error)
- func (a *AzureDevOps) SetPullRequestAutoComplete(projectName string, repositoryName string, pullRequestId int, ...) error
- func (a *AzureDevOps) WaitForBuild(projectName string, buildId int, attempts uint, interval int) error
- type CustomDefinition
- type CustomQueueBuildArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureDevOps ¶
type AzureDevOps struct {
// contains filtered or unexported fields
}
func NewAzureDevOps ¶
func NewAzureDevOps(organisationName string, personalAccessToken string) *AzureDevOps
NewAzureDevOps creates a new AzureDevOps
func (*AzureDevOps) AbandonPullRequest ¶
func (a *AzureDevOps) AbandonPullRequest(projectName string, repositoryName string, pullRequestId int) (*git.GitPullRequest, error)
AbandonPullRequest abandons a GitPullRequest
func (*AzureDevOps) CreateBuildDefinition ¶
func (a *AzureDevOps) CreateBuildDefinition(projectName string, definitionName string, repositoryId string, folderPath string, yamlFilename string) (*build.BuildDefinition, error)
CreateBuildDefinition creates a new BuildDefinition
func (*AzureDevOps) CreatePullRequest ¶
func (a *AzureDevOps) CreatePullRequest(projectName string, repositoryName string, sourceRefName string, targetRefName string, title string) (*git.GitPullRequest, error)
CreatePullRequest creates a GitPullRequest
func (*AzureDevOps) CreateWikiIfNotExists ¶
func (a *AzureDevOps) CreateWikiIfNotExists(projectName string, wikiName string, gitEmail string, gitUsername string) (*wiki.WikiV2, *git.GitRepository, error)
CreateWikiIfNotExists creates a code wiki if it does not exist.
func (*AzureDevOps) FindPullRequest ¶
func (a *AzureDevOps) FindPullRequest(projectName string, repositoryName string, sourceRefName string, targetRefName string) (*git.GitPullRequest, error)
FindPullRequest finds a GitPullRequest
func (*AzureDevOps) GetBuildDefinitionByName ¶
func (a *AzureDevOps) GetBuildDefinitionByName(projectName string, definitionName string) (*build.BuildDefinition, error)
GetBuildDefinitionByName gets a BuildDefinitionReference by name
func (*AzureDevOps) GetFileContent ¶
func (a *AzureDevOps) GetFileContent(projectName string, repoName string, version string, filepath string, versionType string) (*git.GitItem, error)
GetFileContent gets content in a file over API.
func (*AzureDevOps) GetIdentityId ¶
func (a *AzureDevOps) GetIdentityId() (*uuid.UUID, error)
GetIdentityId gets the UUID of the authenticated user. Yes this is weird, see https://github.com/microsoft/azure-devops-python-api/issues/188#issuecomment-494858123
func (*AzureDevOps) GetOrCreateBuildDefinition ¶
func (a *AzureDevOps) GetOrCreateBuildDefinition(projectName string, definitionName string, repositoryId string, folderPath string, yamlFilename string) (*build.BuildDefinition, error)
GetOrCreateBuildDefinition gets or creates a build definition
func (*AzureDevOps) GetPAT ¶
func (a *AzureDevOps) GetPAT() (*string, error)
func (*AzureDevOps) GetPackageVersion ¶
func (a *AzureDevOps) GetPackageVersion(projectName string, feedName string) (*[]feed.Package, error)
GetPackageVersion gets all GitRepository
func (*AzureDevOps) GetRepositories ¶
func (a *AzureDevOps) GetRepositories(projectName string) (*[]git.GitRepository, error)
GetRepositories gets all GitRepository
func (*AzureDevOps) GetRepository ¶
func (a *AzureDevOps) GetRepository(projectName string, name string) (*git.GitRepository, error)
GetRepository gets a GitRepository
func (*AzureDevOps) QueueBuild ¶
func (a *AzureDevOps) QueueBuild(projectName string, definitionId int, sourceBranch string, templateParameters map[string]string, tags []string) (*build.Build, error)
QueueBuild queues and returns a new Build
func (*AzureDevOps) SetPullRequestAutoComplete ¶
func (a *AzureDevOps) SetPullRequestAutoComplete(projectName string, repositoryName string, pullRequestId int, userId *uuid.UUID) error
SetPullRequestAutoComplete completes a GitPullRequest
func (*AzureDevOps) WaitForBuild ¶
func (a *AzureDevOps) WaitForBuild(projectName string, buildId int, attempts uint, interval int) error
WaitForBuild waits for a Build to complete
type CustomDefinition ¶
type CustomDefinition struct {
ID *int `json:"id"`
}
type CustomQueueBuildArgs ¶
type CustomQueueBuildArgs struct { Definition CustomDefinition `json:"definition"` SourceBranch string `json:"sourceBranch"` TemplateParameters map[string]string `json:"templateParameters"` }