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

update nu weekly script (#227)

This commit is contained in:
JT 2022-05-21 10:07:28 +12:00 committed by GitHub
parent 748ee44f61
commit 77b3adca16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,11 +30,12 @@ def do-work [] {
# this is for debugging the rate limit. comment it out if things are working well
# fetch -u $env.GITHUB_USERNAME -p $env.GITHUB_PASSWORD https://api.github.com/rate_limit | get resources | select core.limit core.remaining graphql.limit graphql.remaining integration_manifest.limit integration_manifest.remaining search.limit search.remaining
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 | empty?)) {
$"none found this week(char nl)(char nl)"
} else {
$site_json | group-by user.login | transpose user prs | each { |row|
$site_json | group-by user_login | transpose user prs | each { |row|
let user_name = $row.user
let pr_count = ($row.prs | length)