Skip to content

Commit 260b32f

Browse files
committed
Add assertion that query returns results
1 parent 54b219a commit 260b32f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

make_release/notes/tools.nu

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,16 @@ def query-prs [
4545

4646
let query = $query_parts | str join ' '
4747

48-
(gh --repo $repo pr list --state merged
49-
--limit (inf | into int)
50-
--json author,title,number,mergedAt,url,body,labels
51-
--search $query)
52-
| from json
48+
let results = (
49+
gh --repo $repo pr list --state merged
50+
--limit (inf | into int)
51+
--json author,title,number,mergedAt,url,body,labels
52+
--search $query
53+
| from json
54+
)
55+
56+
assert ($results | is-not-empty) "Query returned no results"
57+
$results
5358
}
5459

5560
# Generate the release notes for the specified version.

0 commit comments

Comments
 (0)