service

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package service provides wrappers for git engines with additional methods, common for each git engine implementations. Consumers should use Service and should never use the naked engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewtracingServiceWithTracing

func NewtracingServiceWithTracing(base tracingService, instance string, spanDecorator ...func(span trace.Span, params, results map[string]interface{})) tracingServiceWithTracing

NewtracingServiceWithTracing returns tracingServiceWithTracing

Types

type ListPRsRequest

type ListPRsRequest struct {
	engine.ListPRsRequest

	WithoutMyUnresolvedThreads bool
	ApprovedByMe               *bool
	SatisfiesApprovalRules     *bool
	Authors                    misc.Filter[string]
	ProjectPaths               misc.Filter[string]
}

ListPRsRequest is a request to list pull requests.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service wraps git engine client with additional functionality.

func NewService

func NewService(ctx context.Context, engine engine.Interface) (*Service, error)

NewService creates a new service.

func (*Service) Approve

func (s *Service) Approve(ctx context.Context, projectID string, number int) error

Approve approves the pull request.

func (*Service) ListPullRequests

func (s *Service) ListPullRequests(ctx context.Context, req ListPRsRequest) ([]git.PullRequest, error)

ListPullRequests calls an underlying git engine client to list pull requests and filters them by the provided criteria.

Jump to

Keyboard shortcuts

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