Skip to content

Commit 15aa05c

Browse files
authored
repos: Use REPOSITORY_NAME for order by (#43)
REPO_URI has been deprecated for many months. This is the only known client of the deprecated enum.
1 parent 175fcfe commit 15aa05c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

cmd/src/repos_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Examples:
9393
var orderBy string
9494
switch *orderByFlag {
9595
case "name":
96-
orderBy = "REPO_URI"
96+
orderBy = "REPOSITORY_NAME"
9797
case "created-at":
9898
orderBy = "REPO_CREATED_AT"
9999
default:

cmd/src/search_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ func TestSearchOutput(t *testing.T) {
113113
}
114114
}
115115

116-
var nMonthsAgoPattern = regexp.MustCompile(`\d+ months? ago`)
116+
var nTimeAgoPattern = regexp.MustCompile(`(\d+|N) (months?|years?|time) ago`)
117117

118118
// normalizeTimeAgo makes tests not depend on the current time.
119119
func normalizeTimeAgo(s *string) {
120-
*s = nMonthsAgoPattern.ReplaceAllString(*s, "N months ago")
120+
*s = nTimeAgoPattern.ReplaceAllString(*s, "N time ago")
121121
}
122122

123123
func TestBuildVersionHasNewSearchInterface(t *testing.T) {

0 commit comments

Comments
 (0)