azure

package
v0.0.0-...-77ee0b1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AzurePrUpdated   = "git.pullrequest.updated"
	AzurePrCreated   = "git.pullrequest.created"
	AzurePrMerged    = "git.pullrequest.merged"
	AzurePrClosed    = "git.pullrequest.closed"
	AzurePrReopened  = "git.pullrequest.reopened"
	AzurePrCommented = "ms.vss-code.git-pullrequest-comment-event"
)

Variables

This section is empty.

Functions

func ConvertAzureEventToCommands

func ConvertAzureEventToCommands(parseAzureContext Azure, impactedProjects []digger_config2.Project, requestedProject *digger_config2.Project, workflows map[string]digger_config2.Workflow) ([]orchestrator.Job, bool, error)

func ProcessAzureReposEvent

func ProcessAzureReposEvent(azureEvent interface{}, diggerConfig *digger_config2.DiggerConfig, ciService orchestrator.PullRequestService) ([]digger_config2.Project, *digger_config2.Project, int, error)

Types

type Azure

type Azure struct {
	EventType    string `json:"eventType"`
	Event        interface{}
	ProjectName  string
	BaseUrl      string
	RepositoryId string
}

func GetAzureReposContext

func GetAzureReposContext(azureContext string) (Azure, error)

func (*Azure) UnmarshalJSON

func (a *Azure) UnmarshalJSON(data []byte) error

type AzureCommentEvent

type AzureCommentEvent struct {
	EventType string `json:"eventType"`
	Resource  struct {
		Comment struct {
			Content string `json:"content"`
		} `json:"comment"`
		PullRequest struct {
			Repository    Repository `json:"repository"`
			PullRequestId int        `json:"pullRequestId"`
		} `json:"pullRequest"`
	} `json:"resource"`
	ResourceContainers ResourceContainers `json:"resourceContainers"`
}

type AzurePrEvent

type AzurePrEvent struct {
	EventType          string             `json:"eventType"`
	Resource           Resource           `json:"resource"`
	ResourceContainers ResourceContainers `json:"resourceContainers"`
}

type AzureReposService

type AzureReposService struct {
	Client       git.Client
	ProjectName  string
	RepositoryId string
}

func NewAzureReposService

func NewAzureReposService(patToken string, baseUrl string, projectName string, repositoryId string) (*AzureReposService, error)

func (*AzureReposService) CreateCommentReaction

func (a *AzureReposService) CreateCommentReaction(id interface{}, reaction string) error

func (*AzureReposService) EditComment

func (a *AzureReposService) EditComment(prNumber int, id interface{}, comment string) error

func (*AzureReposService) GetApprovals

func (svc *AzureReposService) GetApprovals(prNumber int) ([]string, error)

func (*AzureReposService) GetBranchName

func (a *AzureReposService) GetBranchName(prNumber int) (string, string, error)

func (*AzureReposService) GetChangedFiles

func (a *AzureReposService) GetChangedFiles(prNumber int) ([]string, error)

func (*AzureReposService) GetCombinedPullRequestStatus

func (a *AzureReposService) GetCombinedPullRequestStatus(prNumber int) (string, error)

func (*AzureReposService) GetComments

func (a *AzureReposService) GetComments(prNumber int) ([]orchestrator.Comment, error)

func (*AzureReposService) GetUserTeams

func (a *AzureReposService) GetUserTeams(organisation string, user string) ([]string, error)

func (*AzureReposService) IsClosed

func (a *AzureReposService) IsClosed(prNumber int) (bool, error)

func (*AzureReposService) IsMergeable

func (a *AzureReposService) IsMergeable(prNumber int) (bool, error)

func (*AzureReposService) IsMerged

func (a *AzureReposService) IsMerged(prNumber int) (bool, error)

func (*AzureReposService) ListIssues

func (svc *AzureReposService) ListIssues() ([]*orchestrator.Issue, error)

func (*AzureReposService) MergePullRequest

func (a *AzureReposService) MergePullRequest(prNumber int) error

func (*AzureReposService) PublishComment

func (a *AzureReposService) PublishComment(prNumber int, comment string) (*orchestrator.Comment, error)

func (*AzureReposService) PublishIssue

func (svc *AzureReposService) PublishIssue(title string, body string) (int64, error)

func (*AzureReposService) SetOutput

func (svc *AzureReposService) SetOutput(prNumber int, key string, value string) error

func (*AzureReposService) SetStatus

func (a *AzureReposService) SetStatus(prNumber int, status string, statusContext string) error

type Repository

type Repository struct {
	Id      string `json:"id"`
	Name    string `json:"name"`
	Project struct {
		Name string `json:"name"`
	} `json:"project"`
	Status string `json:"status"`
}

type Resource

type Resource struct {
	Repository    Repository `json:"repository"`
	PullRequestId int        `json:"pullRequestId"`
}

type ResourceContainers

type ResourceContainers struct {
	Account struct {
		BaseUrl string `json:"baseUrl"`
	} `json:"account"`
}

Jump to

Keyboard shortcuts

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