fix: address verified review findings (labels-milestones-time-1)

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 17:40:59 +02:00
1 parent be3b8a1ced
commit e28bb6e039
21 files changed
+262 -47

No files matched your search

+3 -1
View File
@@ -120,6 +120,8 @@ func (e *ConflictError) Unwrap() error { return e.Err }
type AmbiguousError struct {
Kind, Key, Scope string
IDs []int64
// Hint replaces the advice to pass an ID where IDs do not select the resource.
Hint string
}
func (e *AmbiguousError) Error() string {
@@ -131,7 +133,7 @@ func (e *AmbiguousError) Error() string {
if e.Scope != "" {
text += " in " + e.Scope
}
return text + " (IDs " + strings.Join(ids, ", ") + "); pass an ID"
return text + " (IDs " + strings.Join(ids, ", ") + "); " + cmp.Or(e.Hint, "pass an ID")
}
// refusals maps the messages Gitea gives for refused requests onto conflict reasons. Each entry