Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Update weekly_report.js to remove old auth token (#251)

Zack Kridae044411b58c4
diff --git a/automations/js/src/weekly_report.js b/automations/js/src/weekly_report.js
index f1fafd9ad..2363f5181 100644
--- a/automations/js/src/weekly_report.js
+++ b/automations/js/src/weekly_report.js
@@ -20,6 +20,14 @@ if (!date) {
)
}
+// get auth key
+const ghKey = process.argv?.[3]
+if (!ghKey) {
+ throw new Error(
+ 'Please supply a GitHub access token with public repo permissions'
+ )
+}
+
// data
const repos = [
'openverse',
@@ -38,7 +46,7 @@ const authFetch = (url) =>
fetch(url, {
headers: {
Authorization:
- 'Basic emFja2tyaWRhOmdocF9JVHdJM2ZGUkVqSjZkOWRBUFFBOE5pWktwNlU0dXkxRTVFak8=',
+ `Basic ${ghKey}`,
},
})
const fetchRepoIssues = compose(authFetch, makeWpIssueUrl)