Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureDevOps ¶
type AzureDevOps struct {
// SourceBranch specifies the pull request source branch.
SourceBranch string `yaml:",omitempty"`
// TargetBranch specifies the pull request target branch.
TargetBranch string `yaml:",omitempty"`
// Project specifies the Azure DevOps project.
Project string `yaml:",omitempty" jsonschema:"required"`
// Repository specifies the Azure DevOps repository.
Repository string `yaml:",omitempty" jsonschema:"required"`
// contains filtered or unexported fields
}
AzureDevOps contains information to interact with Azure DevOps pull requests.
func New ¶
func New(spec interface{}, scm *azdoscm.AzureDevOps) (AzureDevOps, error)
New returns a new valid Azure DevOps action object.
func (*AzureDevOps) CheckActionExist ¶
CheckActionExist verifies if an Azure DevOps pull request is already opened.
func (*AzureDevOps) CleanAction ¶
CleanAction verifies if existing action requires cleanup such as closing a pull request with no changes.
func (*AzureDevOps) CreateAction ¶
func (a *AzureDevOps) CreateAction(ctx context.Context, report *reports.Action, resetDescription bool) error
CreateAction opens or updates a pull request on Azure DevOps.
type Spec ¶
type Spec struct {
azdoclient.Spec
// "sourcebranch" defines the source branch used to create the pull request.
SourceBranch string `yaml:",omitempty"`
// "targetbranch" defines the target branch used to create the pull request.
TargetBranch string `yaml:",omitempty"`
// "title" defines the pull request title.
Title string `yaml:",omitempty"`
// "body" defines a custom pull request body.
Body string `yaml:",omitempty"`
// "draft" defines if the pull request should be created as draft.
Draft *bool `yaml:",omitempty"`
}
Spec defines settings used to interact with Azure DevOps pull requests.
Click to show internal directories.
Click to hide internal directories.