bzp2010 commented on a change in pull request #913:
URL: https://github.com/apache/apisix-website/pull/913#discussion_r817272899
##########
File path: scripts/generate-repos-info.js
##########
@@ -0,0 +1,71 @@
+const fs = require("fs");
+const axios = require("axios");
+const listr = require("listr")
+
+axios.defaults.timeout = 5000;
+
+const axiosConfig = {
+ headers: {
+ "content-type": "application/json",
+ Accept: "application/vnd.github.v3+json"
+ },
+}
+
+const repoList = require("../website/config/docs").map(v => v.githubRepo)
+const res = {}
+
+const tasks = new listr([
+ {
+ title: "Fetch repos' info and good first issues",
+ task: ()=> new listr(repoList.map((repo)=>{
+ return {
+ title: `Fetch ${repo}`,
+ task: ()=>new listr([
+ {
+ title: `${repo}'s info`,
+ task: () => axios.get(`https://api.github.com/repos/${repo}`,
axiosConfig)
Review comment:
We should consider the case of a failed data pull, at which point we
might be to interrupt the CI execution.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]