diff options
author | Chocobozzz <me@florianbigard.com> | 2019-01-10 12:07:34 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-01-10 12:07:34 +0100 |
commit | 93f85e90ffa27453e2c909406b62bef65963b8ad (patch) | |
tree | 73ba39ed80a4ce05ec84980f47be563e817dad39 /scripts | |
parent | 26a008fe8d71b1bba818dd5f4fae760e0f7fc47c (diff) | |
download | PeerTube-93f85e90ffa27453e2c909406b62bef65963b8ad.tar.gz PeerTube-93f85e90ffa27453e2c909406b62bef65963b8ad.tar.zst PeerTube-93f85e90ffa27453e2c909406b62bef65963b8ad.zip |
Update credits
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/generate-code-contributors.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/generate-code-contributors.ts b/scripts/generate-code-contributors.ts index 3d37372d1..9824bc2f5 100755 --- a/scripts/generate-code-contributors.ts +++ b/scripts/generate-code-contributors.ts | |||
@@ -70,11 +70,17 @@ async function fetchGithub (url: string) { | |||
70 | 70 | ||
71 | async function fetchZanata (zanataUsername: string, zanataPassword: string) { | 71 | async function fetchZanata (zanataUsername: string, zanataPassword: string) { |
72 | const today = new Date().toISOString().split('T')[0] | 72 | const today = new Date().toISOString().split('T')[0] |
73 | const url = `https://trad.framasoft.org/zanata/rest/project/peertube/version/develop/contributors/2018-01-01..${today}` | 73 | const year2018 = `https://trad.framasoft.org/zanata/rest/project/peertube/version/develop/contributors/2018-01-01..2019-01-01` |
74 | const year2019 = `https://trad.framasoft.org/zanata/rest/project/peertube/version/develop/contributors/2019-01-01..${today}` | ||
74 | 75 | ||
75 | const headers = { | 76 | const headers = { |
76 | 'X-Auth-User': zanataUsername, | 77 | 'X-Auth-User': zanataUsername, |
77 | 'X-Auth-Token': zanataPassword | 78 | 'X-Auth-Token': zanataPassword |
78 | } | 79 | } |
79 | return get(url, headers) | 80 | const [ results2018, results2019 ] = await Promise.all([ |
81 | get(year2018, headers), | ||
82 | get(year2019, headers) | ||
83 | ]) | ||
84 | |||
85 | return results2018.concat(results2019) | ||
80 | } | 86 | } |