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

Function getPullRequestByIssueID

internal/database/pull.go:589–600  ·  view source on GitHub ↗
(e Engine, issueID int64)

Source from the content-addressed store, hash-verified

587}
588
589func getPullRequestByIssueID(e Engine, issueID int64) (*PullRequest, error) {
590 pr := &PullRequest{
591 IssueID: issueID,
592 }
593 has, err := e.Get(pr)
594 if err != nil {
595 return nil, err
596 } else if !has {
597 return nil, ErrPullRequestNotExist{args: map[string]any{"issueID": issueID}}
598 }
599 return pr, pr.loadAttributes(e)
600}
601
602// GetPullRequestByIssueID returns pull request by given issue ID.
603func GetPullRequestByIssueID(issueID int64) (*PullRequest, error) {

Callers 2

GetPullRequestByIssueIDFunction · 0.85
loadAttributesMethod · 0.85

Calls 2

loadAttributesMethod · 0.95
GetMethod · 0.65

Tested by

no test coverage detected