azure

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: 0BSD Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPullRequestAlreadyExists = errors.New("an active pull request for the source and target branch already exists")
)

Functions

func NewPrClient

func NewPrClient(upstreamRepo string, auth *url.Userinfo, client httpClient) (*pullRequestClient, error)

Types

type PullRequestPayload

type PullRequestPayload struct {
	SourceRefName string                `json:"sourceRefName,omitempty"`
	TargetRefName string                `json:"targetRefName,omitempty"`
	Title         string                `json:"title,omitempty"`
	Description   string                `json:"description,omitempty"`
	Reviewers     []PullRequestReviewer `json:"reviewers,omitempty"`
}

Example Payload:

{
	"sourceRefName": "refs/heads/npaulk/my_work",
	"targetRefName": "refs/heads/new_feature",
	"title": "A new feature",
	"description": "Adding a new feature",
	"reviewers": [
	  {
		"id": "d6245f20-2af8-44f4-9451-8107cb2767db"
	  }
	]
  }

type PullRequestReviewer

type PullRequestReviewer struct {
	Id string `json:"id,omitempty"`
}

Jump to

Keyboard shortcuts

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