MCPcopy Create free account
hub / github.com/gogs/gogs / getPullRequestByID

Function getPullRequestByID

internal/database/pull.go:573–582  ·  view source on GitHub ↗
(e Engine, id int64)

Source from the content-addressed store, hash-verified

571}
572
573func getPullRequestByID(e Engine, id int64) (*PullRequest, error) {
574 pr := new(PullRequest)
575 has, err := e.ID(id).Get(pr)
576 if err != nil {
577 return nil, err
578 } else if !has {
579 return nil, ErrPullRequestNotExist{args: map[string]any{"pullRequestID": id}}
580 }
581 return pr, pr.loadAttributes(e)
582}
583
584// GetPullRequestByID returns a pull request by given ID.
585func GetPullRequestByID(id int64) (*PullRequest, error) {

Callers 1

GetPullRequestByIDFunction · 0.85

Calls 3

GetMethod · 0.65
IDMethod · 0.65
loadAttributesMethod · 0.45

Tested by

no test coverage detected