aboutsummaryrefslogtreecommitdiff
path: root/internal/db/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/issue.go')
-rw-r--r--internal/db/issue.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/db/issue.go b/internal/db/issue.go
index bb935dd9..79d4a7b9 100644
--- a/internal/db/issue.go
+++ b/internal/db/issue.go
@@ -817,12 +817,11 @@ func (ErrIssueNotExist) NotFound() bool {
return true
}
-// GetIssueByRef returns an Issue specified by a GFM reference.
-// See https://help.github.com/articles/writing-on-github#references for more information on the syntax.
+// GetIssueByRef returns an Issue specified by a GFM reference, e.g. owner/repo#123.
func GetIssueByRef(ref string) (*Issue, error) {
n := strings.IndexByte(ref, byte('#'))
if n == -1 {
- return nil, errors.InvalidIssueReference{Ref: ref}
+ return nil, ErrIssueNotExist{args: map[string]interface{}{"ref": ref}}
}
index := com.StrTo(ref[n+1:]).MustInt64()