Improve github manual sync message and docs

This commit is contained in:
Carlos Monastyrski
2025-09-02 12:38:02 -03:00
parent da0d4a31b1
commit be588c2653
11 changed files with 59 additions and 159 deletions
@@ -137,7 +137,6 @@ export const registerGithubOrgSyncRouter = async (server: FastifyZodProvider) =>
schema: {
response: {
200: z.object({
syncedUsersCount: z.number(),
totalUsers: z.number(),
errors: z.array(z.string()),
createdTeams: z.array(z.string()),
@@ -153,7 +152,6 @@ export const registerGithubOrgSyncRouter = async (server: FastifyZodProvider) =>
});
return {
syncedUsersCount: result.syncedUsersCount,
totalUsers: result.totalUsers,
errors: result.errors,
createdTeams: result.createdTeams,
@@ -553,7 +553,6 @@ export const githubOrgSyncServiceFactory = ({
) as OrgMembershipWithUser[];
const startTime = Date.now();
let syncedUsersCount = 0;
const syncErrors: string[] = [];
const octokit = new OctokitWithPlugin({
@@ -683,8 +682,6 @@ export const githubOrgSyncServiceFactory = ({
const updatedTeams = new Set<string>();
const totalRemovedMemberships = 0;
syncedUsersCount = allGithubUsernamesInTeams.size;
await groupDAL.transaction(async (tx) => {
if (teamsToCreate.length > 0) {
const newGroups = await groupDAL.insertMany(
@@ -810,7 +807,6 @@ export const githubOrgSyncServiceFactory = ({
);
return {
syncedUsersCount,
totalUsers: activeMembers.length,
errors: syncErrors,
createdTeams: Array.from(createdTeams),
@@ -27,7 +27,6 @@ export interface TSyncAllTeamsDTO {
}
export interface TSyncResult {
syncedUsersCount: number;
totalUsers: number;
errors: string[];
createdTeams: string[];