1 changed files with 19 additions and 0 deletions
@ -0,0 +1,19 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
#Создан: вт 15 окт 2019 11:15:12 |
||||||
|
#Изменён: вт 15 окт 2019 21:31:41 |
||||||
|
|
||||||
|
API="https://api.github.com/repos/" |
||||||
|
|
||||||
|
last_forks() { |
||||||
|
curl -sq "${API}${1}/forks?sort=stargazers&per_page=100" \ |
||||||
|
| jq -r '.[] | "\(.updated_at) \(.full_name)"' 2>&- \ |
||||||
|
| sed "s|^| |; s|T| |; s|Z | https://github.com/|" \ |
||||||
|
| sort -r \ |
||||||
|
| head -n "${2:-15}" |
||||||
|
} |
||||||
|
|
||||||
|
repository="${1?"USAGE $(basename "$0") user/repository ?top?"}" |
||||||
|
|
||||||
|
last_forks "$repository" "$2" |
||||||
|
|
Loading…
Reference in new issue