import { syncOrgsWithMembers } from "../github/github-utils.js"
import { githubApp } from "../github/github-app.js"
;(async () => {
  try {
    const orgs = process.argv.slice(2)
    if (orgs.length === 0) {
      console.error(
        "Error: Please provide at least one organization name as a command line argument.",
      )
      process.exit(1)
    }
    await syncOrgsWithMembers(githubApp, orgs)
    console.log("✅ DONE")
  } catch (error) {
    console.error(error)
  }
})()
