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

Function GetRawIssueByIndex

internal/database/issue.go:850–862  ·  view source on GitHub ↗

GetRawIssueByIndex returns raw issue without loading attributes by index in a repository.

(repoID, index int64)

Source from the content-addressed store, hash-verified

848
849// GetRawIssueByIndex returns raw issue without loading attributes by index in a repository.
850func GetRawIssueByIndex(repoID, index int64) (*Issue, error) {
851 issue := &Issue{
852 RepoID: repoID,
853 Index: index,
854 }
855 has, err := x.Get(issue)
856 if err != nil {
857 return nil, err
858 } else if !has {
859 return nil, ErrIssueNotExist{args: map[string]any{"repoID": repoID, "index": index}}
860 }
861 return issue, nil
862}
863
864// GetIssueByIndex returns issue by index in a repository.
865func GetIssueByIndex(repoID, index int64) (*Issue, error) {

Callers 2

ListIssueCommentsFunction · 0.92
GetIssueByIndexFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected