This is an automated email from the ASF dual-hosted git repository.

wu-sheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 17b3b71ddf1 fix(ci): authenticate team.js GitHub API calls with 
GITHUB_TOKEN
17b3b71ddf1 is described below

commit 17b3b71ddf16ad3ac56fd5b4a6952cff02649dce
Author: Wu Sheng <[email protected]>
AuthorDate: Sun May 24 14:26:52 2026 +0800

    fix(ci): authenticate team.js GitHub API calls with GITHUB_TOKEN
    
    scripts/team.js was making anonymous GitHub API calls and hitting the
    60-req/hr-per-IP unauthenticated rate limit (403). CI exposes
    GITHUB_TOKEN but only stars.js was reading it; team.js was left out.
    Mirroring the auth header lifts the cap to 5000/hr.
---
 scripts/team.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/team.js b/scripts/team.js
index ce27339774e..79996fd5880 100644
--- a/scripts/team.js
+++ b/scripts/team.js
@@ -82,7 +82,13 @@ class GenerateTeamYaml {
   }
 
   async getRepoContributors({user, repo, extraContributors = [], page = 1, 
per_page = 100, list = [], item}) {
-    let {data = []} = await 
axios.get(`https://api.github.com/repos/${user}/${repo}/contributors?page=${page}&per_page=${per_page}&anon=true&t=${new
 Date().getTime()}`)
+    // GitHub's anonymous rate limit is 60 req/hr/IP — far too low for ~49 
repos
+    // with multi-page contributor lists. Auth lifts the cap to 5000/hr.
+    const headers = {'User-Agent': 'skywalking-website-build'};
+    if (process.env.GITHUB_TOKEN) {
+      headers['Authorization'] = `Bearer ${process.env.GITHUB_TOKEN}`;
+    }
+    let {data = []} = await 
axios.get(`https://api.github.com/repos/${user}/${repo}/contributors?page=${page}&per_page=${per_page}&anon=true&t=${new
 Date().getTime()}`, {headers})
     data = this.handleData(data);
     list.push(...data);
     if (data.length === per_page) {

Reply via email to