@@ -28,18 +28,18 @@ jobs:
2828 # CENTRAL USER REGISTRY
2929 USER_MAPPING : |
3030 {
31- "aaronb-stacks": { "id": "U067F1SRYT0", "name": " Aaron" } ,
32- "adriano-stacks": { "id": "U07CAH5D38Q", "name": " Adriano" } ,
33- "benjamin-stacks": { "id": "U09N5BM0SGP", "name": " Benjamin" } ,
34- "brice-stacks": { "id": "U067BVCJE30", "name": " Brice" } ,
35- "cylewitruk-stacks": { "id": "U06815BCSB0", "name": " Cyle" } ,
36- "dhaney-stacks": { "id": "U09538PV0RZ", "name": " David" } ,
37- "federico-stacks": { "id": "U08ASJ1LKEV", "name": " Federico" } ,
38- "francesco-stacks": { "id": "U07MCETKTKN", "name": " Francesco" } ,
39- "hstove-stacks": { "id": "U068W8VBSQM", "name": " Hank" } ,
40- "radu-stacks": { "id": "U0ANRRXD080", "name": " Radu" } ,
41- "rob-stacks": { "id": "U07UNFAS4BD", "name": " Roberto" } ,
42- "simone-stacks": { "id": "U09NA1TP8PK", "name": " Simone" }
31+ "aaronb-stacks": " Aaron",
32+ "adriano-stacks": " Adriano",
33+ "benjamin-stacks": " Benjamin",
34+ "brice-stacks": " Brice",
35+ "cylewitruk-stacks": " Cyle",
36+ "dhaney-stacks": " David",
37+ "federico-stacks": " Federico",
38+ "francesco-stacks": " Francesco",
39+ "hstove-stacks": " Hank",
40+ "radu-stacks": " Radu",
41+ "rob-stacks": " Roberto",
42+ "simone-stacks": " Simone"
4343 }
4444 # ------------------------------
4545
7070
7171 const getDocName = (username) => {
7272 const clean = username.toLowerCase();
73- if (userMap[clean] && userMap[clean].name ) return userMap[clean].name ;
73+ if (userMap[clean]) return userMap[clean];
7474 const base = clean.replace('-stacks', '');
7575 return base.charAt(0).toUpperCase() + base.slice(1);
7676 };
@@ -84,19 +84,16 @@ jobs:
8484 };
8585
8686 // 2. Fetch open Pull Requests
87- const { data: prs } = await github.rest.pulls.list({
88- owner,
89- repo,
90- state: 'open',
91- per_page: 100
87+ const prs = await github.paginate(github.rest.pulls.list, {
88+ owner, repo, state: 'open', per_page: 100
9289 });
9390
9491 const filteredSortedPrs = prs
9592 .filter(pr => {
9693 if (ignoreDrafts && pr.draft) return false;
9794 return allowedUsers.has(pr.user.login.toLowerCase());
9895 })
99- // MODIFIED: Sort alphabetically by team meeting display name
96+ // Sort alphabetically by team meeting display name
10097 .sort((a, b) => {
10198 const authorA = getDocName(a.user.login).toLowerCase();
10299 const authorB = getDocName(b.user.login).toLowerCase();
@@ -159,4 +156,4 @@ jobs:
159156 core.setFailed(`Slack API responded with status ${response.status}`);
160157 } else {
161158 console.log(`Successfully posted ${filteredSortedPrs.length} PR lines to Slack.`);
162- }
159+ }
0 commit comments