1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 22:57:46 +00:00

Fix TWiN script (#328)

This commit is contained in:
JT 2022-12-17 07:44:24 +13:00 committed by GitHub
parent d003da280a
commit ddcf11963b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,7 @@ def do-work [] {
let site_json = (fetch -u $env.GITHUB_USERNAME -p $env.GITHUB_PASSWORD $query_string | get items | select html_url user.login title)
$"## ($row.site)(char nl)(char nl)"
if ($site_json | all ($it | is-empty)) {
if ($site_json | all { |it| $it | is-empty }) {
$"none found this week(char nl)(char nl)"
} else {
$site_json | group-by user_login | transpose user prs | each { |row|
@ -55,7 +55,7 @@ def do-work [] {
}
})
if ($entries | all ($it | is-empty)) {
if ($entries | all { |it| $it | is-empty }) {
# do nothing
} else {
$entries | str collect