Skip to content

Commit

Permalink
Update error for org members not found
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjozwiak committed Jan 17, 2024
1 parent 5d99f0a commit 21c216d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
10 changes: 8 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22349,8 +22349,14 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
core.debug(JSON.stringify(usersToDeploy, null, 2));
const uniqueOrganizations = new Set(usersToDeploy.map(user => user.organization));
for (const organization of uniqueOrganizations) {
const members = yield getOrgMembers(organization, octokit);
core.info(`Found ${members.length} members in ${organization}.`);
try {
const members = yield getOrgMembers(organization, octokit);
core.info(`Found ${members.length} members in ${organization}.`);
}
catch (error) {
core.error(`Failed to fetch members for organization ${organization}: ${error}`);
return;
}
}
usersToDeploy.forEach((user) => __awaiter(void 0, void 0, void 0, function* () {
var _a, _b, _c;
Expand Down
9 changes: 7 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,13 @@ const run = async (): Promise<void> => {
// Get members from each organization
const uniqueOrganizations = new Set(usersToDeploy.map(user => user.organization));
for (const organization of uniqueOrganizations) {
const members = await getOrgMembers(organization, octokit);
core.info(`Found ${members.length} members in ${organization}.`);
try {
const members = await getOrgMembers(organization, octokit);
core.info(`Found ${members.length} members in ${organization}.`);
} catch (error) {
core.error(`Failed to fetch members for organization ${organization}: ${error}`);
return;
}
}

usersToDeploy.forEach(async user => {
Expand Down

0 comments on commit 21c216d

Please sign in to comment.