github.com/argoproj/argo-cd/v3@v3.2.1/applicationset/services/pull_request/interface.go (about)

     1  package pull_request
     2  
     3  import (
     4  	"context"
     5  	"regexp"
     6  )
     7  
     8  type PullRequest struct {
     9  	// Number is a number that will be the ID of the pull request.
    10  	Number int
    11  	// Title of the pull request.
    12  	Title string
    13  	// Branch is the name of the branch from which the pull request originated.
    14  	Branch string
    15  	// TargetBranch is the name of the target branch of the pull request.
    16  	TargetBranch string
    17  	// HeadSHA is the SHA of the HEAD from which the pull request originated.
    18  	HeadSHA string
    19  	// Labels of the pull request.
    20  	Labels []string
    21  	// Author is the author of the pull request.
    22  	Author string
    23  }
    24  
    25  type PullRequestService interface {
    26  	// List gets a list of pull requests.
    27  	List(ctx context.Context) ([]*PullRequest, error)
    28  }
    29  
    30  type Filter struct {
    31  	BranchMatch       *regexp.Regexp
    32  	TargetBranchMatch *regexp.Regexp
    33  	TitleMatch        *regexp.Regexp
    34  }