mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-17 14:00:01 +02:00
[API] ListIssues add filter for milestones (#10148)
* Refactor Issue Filter Func * ListIssues add filter for milestones * as per @lafriks * documentation ...
This commit is contained in:
parent
cbf5dffaf2
commit
bfda0f3864
10 changed files with 102 additions and 29 deletions
|
@ -1560,6 +1560,7 @@ func (err ErrLabelNotExist) Error() string {
|
|||
type ErrMilestoneNotExist struct {
|
||||
ID int64
|
||||
RepoID int64
|
||||
Name string
|
||||
}
|
||||
|
||||
// IsErrMilestoneNotExist checks if an error is a ErrMilestoneNotExist.
|
||||
|
@ -1569,6 +1570,9 @@ func IsErrMilestoneNotExist(err error) bool {
|
|||
}
|
||||
|
||||
func (err ErrMilestoneNotExist) Error() string {
|
||||
if len(err.Name) > 0 {
|
||||
return fmt.Sprintf("milestone does not exist [name: %s, repo_id: %d]", err.Name, err.RepoID)
|
||||
}
|
||||
return fmt.Sprintf("milestone does not exist [id: %d, repo_id: %d]", err.ID, err.RepoID)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue