Skip to content

Conversation

@treyp
Copy link
Contributor

@treyp treyp commented Feb 28, 2025

📝 Description

  • In the approvals-satisfied script, when fetching the members for a GitHub team, only the first page of 100 members is fetched. This is a limitation for teams with more than 100 members. This PR adds support for fetching all pages of members of an org.

🔗 Related Issues

@treyp treyp requested a review from a team as a code owner February 28, 2025 22:17
@treyp treyp force-pushed the large-approval-teams branch from f981c6e to 14da080 Compare February 28, 2025 22:38
import { convertToTeamSlug } from './convert-to-team-slug';
import { context } from '@actions/github';

export const paginateMembersInOrg = async (team: string, page: number = 1): Promise<MembersInOrg> => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to look out for: If someone tried to fetch members of large github teams it might end up hitting API limit.

Copy link
Contributor

@danadajian danadajian Mar 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the max team size is 5000, in which case this would use 50 API hits which wouldn't reach any rate limit.

@treyp treyp force-pushed the large-approval-teams branch from 14da080 to c540305 Compare March 1, 2025 00:48
@danadajian danadajian merged commit 6e8cd06 into ExpediaGroup:main Mar 1, 2025
5 of 6 checks passed
@eg-oss-ci
Copy link

🎉 This PR is included in version 1.74.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants