Skip to content

Conversation

@vivekjami
Copy link

This PR adds validation to check for duplicate entries in team members and alumni lists.

Fixes rust-lang/team #1918

Changes:

  • Added new validate_duplicate_team_entries function
  • Checks team members and alumni
  • Uses separate function for cleaner code design as suggested by @Kivooeo

@vivekjami
Copy link
Author

@marcoieni

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

Dry-run check results

[WARN  sync_team] sync-team is running in dry mode, no changes will be applied.
[INFO  sync_team] synchronizing github

@Kivooeo
Copy link
Member

Kivooeo commented Nov 6, 2025

I tried open the link from #2032 (comment)

And it seems like it was disabled due to inactivity, so I updated link, so you can see https://github.com/rust-lang/team/compare/main...Kivooeo:team:add-check?expand=1, how I made this and read this comment above about some details, but I lean to this solution because it does account leads as well without repeating logic in check function

@vivekjami
Copy link
Author

Yes @Kivooeo , I saw your pr and i agree with your approach but i do not know if i can change the schema.rs as that was not specified in the pr and that is the cleanest way to handle team leads and I want to see the errors that needs to resolve in a single check so that i can solve the issue, so that is why i avoided bail!() , if i used that then your code works perfectly. @marcoieni any thoughts?

@marcoieni
Copy link
Member

marcoieni commented Nov 7, 2025

you can change schema.rs, for sure!
Extracting the logic so that you don't repeat it, also sounds great!

@jieyouxu jieyouxu added S-waiting-on-review Status: waiting on review from a team/WG/PG lead, an infra-admin, and/or a team-repo-admin. T-infra Relevant to the infrastructure team. labels Nov 8, 2025
@vivekjami vivekjami force-pushed the add-team-and-alumni-name-check branch from 201e079 to 35fc992 Compare November 12, 2025 18:32
- Add explicit_leads() method to expose team leads
- Add validate_duplicate_team_entries() to check for duplicates
- Check leads, members, and alumni for duplicates
- Collect all errors for better developer experience
@vivekjami vivekjami force-pushed the add-team-and-alumni-name-check branch from 2ccbf35 to c318366 Compare November 12, 2025 18:36
@vivekjami
Copy link
Author

@marcoieni just updated the code with the new requirements

@jieyouxu jieyouxu added the needs-infra-admin-review This change requires one of the `infra-admins` to review. label Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-infra-admin-review This change requires one of the `infra-admins` to review. S-waiting-on-review Status: waiting on review from a team/WG/PG lead, an infra-admin, and/or a team-repo-admin. T-infra Relevant to the infrastructure team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants