Skip to content

Conversation

Eomm
Copy link
Member

@Eomm Eomm commented Oct 5, 2025

Fixes #3

Output example:

image

Thanks @ilteoood

const orgTeams = await client.getOrgChart(orgData)
const destinationTeams = orgTeams.filter(t => joiningTeams.includes(t.slug))
if (destinationTeams.length !== joiningTeams.length) {
const missing = joiningTeams.filter(t => destinationTeams.find(dt => dt.slug === t) == null)
Copy link

Choose a reason for hiding this comment

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

What if you use the Set difference?
If you make joiningTeams a set, you can also use it on line 20, to replace the includes with the has.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Onboard a new collaborator
2 participants