gitea

package
v0.17.4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PullRequest

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

PullRequest is a comment and diff service for Gitea PullRequest.

API:

https://try.gitea.io/api/swagger#/issue/issueCreateComment
POST /repos/:owner/:repo/issues/:number/comments

func NewGiteaPullRequest

func NewGiteaPullRequest(cli *gitea.Client, owner, repo string, pr int64, sha string) (*PullRequest, error)

NewGiteaPullRequest returns a new PullRequest service. PullRequest service needs git command in $PATH.

func (*PullRequest) Diff

func (g *PullRequest) Diff(_ context.Context) ([]byte, error)

Diff returns a diff of PullRequest.

func (*PullRequest) Flush

func (g *PullRequest) Flush(_ context.Context) error

Flush posts comments which has not been posted yet.

func (*PullRequest) Post

Post accepts a comment and holds it. Flush method actually posts comments to Gitea in parallel.

func (*PullRequest) Strip

func (g *PullRequest) Strip() int

Strip returns 1 as a strip of git diff.

Jump to

Keyboard shortcuts

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