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.
Click to show internal directories.
Click to hide internal directories.