Files
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>reggie-kNitish Kumar
0940bdf7bd chore(deps): bump gitlab.com/gitlab-org/api/client-go from 0.160.0 to 1.5.0 (#25481)
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: reggie-k <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: reggie-k <[email protected]>
Co-authored-by: Nitish Kumar <[email protected]>
2025-12-04 14:02:38 +02:00

36 lines
897 B
Go

package pull_request
import (
"context"
"regexp"
)
type PullRequest struct {
// Number is a number that will be the ID of the pull request.
// Gitlab uses int64 for the pull request number.
Number int64
// Title of the pull request.
Title string
// Branch is the name of the branch from which the pull request originated.
Branch string
// TargetBranch is the name of the target branch of the pull request.
TargetBranch string
// HeadSHA is the SHA of the HEAD from which the pull request originated.
HeadSHA string
// Labels of the pull request.
Labels []string
// Author is the author of the pull request.
Author string
}
type PullRequestService interface {
// List gets a list of pull requests.
List(ctx context.Context) ([]*PullRequest, error)
}
type Filter struct {
BranchMatch *regexp.Regexp
TargetBranchMatch *regexp.Regexp
TitleMatch *regexp.Regexp
}