Skip to content

Commit 766f4d0

Browse files
committed
Fetch branch list order by TAG_COMMIT_DATE descending
1 parent 7e72b34 commit 766f4d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (g GitHub) ListBranch(name string) ([]string, error) {
134134
Repository struct {
135135
Refs struct {
136136
Nodes []refs
137-
} `graphql:"refs(first: 50, refPrefix: \"refs/heads/\")"`
137+
} `graphql:"refs(first: 50, refPrefix: \"refs/heads/\", orderBy: {field: TAG_COMMIT_DATE, direction: DESC})"`
138138
} `graphql:"repository(owner: $org, name: $name)"`
139139
}
140140
variables := map[string]interface{}{

0 commit comments

Comments
 (0)