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

Function getMilestoneByRepoID

internal/database/milestone.go:150–162  ·  view source on GitHub ↗
(e Engine, repoID, id int64)

Source from the content-addressed store, hash-verified

148}
149
150func getMilestoneByRepoID(e Engine, repoID, id int64) (*Milestone, error) {
151 m := &Milestone{
152 ID: id,
153 RepoID: repoID,
154 }
155 has, err := e.Get(m)
156 if err != nil {
157 return nil, err
158 } else if !has {
159 return nil, ErrMilestoneNotExist{args: map[string]any{"repoID": repoID, "milestoneID": id}}
160 }
161 return m, nil
162}
163
164// GetWebhookByRepoID returns the milestone in a repository.
165func GetMilestoneByRepoID(repoID, id int64) (*Milestone, error) {

Callers 5

GetMilestoneByRepoIDFunction · 0.85
changeMilestoneAssignFunction · 0.85
loadAttributesMethod · 0.85
newIssueFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected