komony / sync-teams

Sync GitHub Teams Across Orgs (Or the Same Org)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sync-teams

Sync GitHub Teams Across Orgs (or same org)

Simple GitHub Utility script that utilizes the Org, Team and Memberships API of GitHub to sync two teams within the same or different org as long as the person running it has the token of an admin of both teams. The script maintains the role of the members while copying them to the new team - so both teams will have the same set of maintainers and members.

To run the script, use the following command format:

python 3 sync-teams.py "<SOURCE_TEAM>" "<DESTINATION_TEAM>" <OAUTH_TOKEN>

Usage Notes:

For eg: python 3 sync-teams.py "some-org/team name" "some-org/team name 2" somerandomtoken

GitHub Enterprise Usage:

  • To run it against a custom GitHub Enterprise installation, update the GITHUB_API constant to point to your installation API endpoint.

About

Sync GitHub Teams Across Orgs (Or the Same Org)


Languages

Language:Python 100.0%