forked from hylang/hy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b54e3c
commit a318afe
Showing
2 changed files
with
37 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
;; You need to install the requests package first | ||
|
||
(import os.path) | ||
(import requests) | ||
|
||
|
||
(setv *api-url* "https://api.github.com/{}") | ||
(setv *rst-format* "* `{} <{}>`_") | ||
(setv *missing-names* {"khinsen" "Konrad Hinsen"}) | ||
;; We have three concealed members on the hylang organization | ||
;; and GitHub only shows public members if the requester is not | ||
;; an owner of the organization. | ||
(setv *concealed-members* [(, "aldeka" "Karen Rustad") | ||
(, "tuturto" "Tuukka Turto") | ||
(, "cndreisbach" "Clinton N. Dreisbach")]) | ||
|
||
(defn get-dev-name [login] | ||
(setv name (get (.json (requests.get (.format *api-url* (+ "users/" login)))) "name")) | ||
(if-not name | ||
(.get *missing-names* login) | ||
name)) | ||
|
||
(setv coredevs (requests.get (.format *api-url* "orgs/hylang/members"))) | ||
|
||
(setv result (set)) | ||
(for [dev (.json coredevs)] | ||
(result.add (.format *rst-format* (get-dev-name (get dev "login")) | ||
(get dev "html_url")))) | ||
|
||
(for [(, login name) *concealed-members*] | ||
(result.add (.format *rst-format* name (+ "https://github.com/" login)))) | ||
|
||
(setv filename (os.path.abspath (os.path.join os.path.pardir | ||
"docs" "coreteam.rst"))) | ||
|
||
(with [[fobj (open filename "w+")]] | ||
(fobj.write (+ (.join "\n" result) "\n"))) |
This file was deleted.
Oops, something went wrong.