(e Engine, repoID, id int64)
| 148 | } |
| 149 | |
| 150 | func 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. |
| 165 | func GetMilestoneByRepoID(repoID, id int64) (*Milestone, error) { |
no test coverage detected