pullrequest

package
v0.117.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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

func (a *AzureDevOps) CheckActionExist(ctx context.Context, report *reports.Action) error

CheckActionExist verifies if an Azure DevOps pull request is already opened.

func (*AzureDevOps) CleanAction

func (a *AzureDevOps) CleanAction(ctx context.Context, report *reports.Action) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL