mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 07:07:46 +00:00
update nu weekly script (#227)
This commit is contained in:
parent
748ee44f61
commit
77b3adca16
1 changed files with 2 additions and 1 deletions
|
@ -30,11 +30,12 @@ def do-work [] {
|
||||||
# this is for debugging the rate limit. comment it out if things are working well
|
# 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
|
# 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)
|
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)"
|
$"## ($row.site)(char nl)(char nl)"
|
||||||
if ($site_json | all? ($it | empty?)) {
|
if ($site_json | all? ($it | empty?)) {
|
||||||
$"none found this week(char nl)(char nl)"
|
$"none found this week(char nl)(char nl)"
|
||||||
} else {
|
} 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 user_name = $row.user
|
||||||
let pr_count = ($row.prs | length)
|
let pr_count = ($row.prs | length)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue