Move from GitHub / Sync
Sync every repository of an organization
You imported a GitHub organization with its issues and pull requests, and you want each of its repositories to stay in sync with GitHub. You do not want to turn on sync in the settings of each repository.
3 min read
The settings of the organization have one button for this. It turns on GitHub sync for each repository that can sync, with you as the sync owner.
Before you start
You need:
- An organization imported from GitHub, with Import issues and pull requests on. See Import a GitHub organization.
- The
settings:managepermission of the organization. Owners of the organization have it. - Your GitHub account connected for sync: in Connected accounts, click Connect GitHub for sync. If repositories are private on GitHub, turn on Private repositories too first.
- Admin access on GitHub to each repository. Your token makes the webhook of each repository on GitHub.
1. Turn on sync
- Open the page of the organization, then click Manage organization.
- On the General tab, find the GitHub sync card.
- Click Turn on GitHub sync for all repositories.
If the card says that GitHub is not connected, click Open Connected accounts. Connect GitHub, then click the button again.
2. Read the result
The card shows two lists:
- Queued: sync turns on for these repositories in the background. You are the sync owner of each one.
- Skipped: these repositories do not change. Each one shows the reason.
A repository whose import still runs is queued too. Its sync turns on when the import is done.
The reasons for a skip:
| Reason | What to do |
|---|---|
| You are not an admin of this repository | Ask an admin of the repository to turn on sync in its settings. |
| Sync is already on | Nothing. |
| Not imported from GitHub with its issues and pull requests | This repository cannot sync. See Before you start of the sync setup. |
| Its GitHub import failed | Click Retry next to the badge of the repository, and follow Retry a failed import. Then click the button again. |
Each queued repository syncs its default branch. To add release branches, change Release branches in the GitHub sync section of the repository's settings.
3. Watch the progress
Each repository shows a badge in its header, and on its row in the list of repositories of the organization:
- Synced with GitHub: sync is on. Everyone who can read the repository sees this badge.
- GitHub sync problem: sync is on, but it has a warning, or the token of the sync owner stopped. Only admins see this badge.
- GitHub sync failed: sync did not turn on. Only admins see this badge.
Click GitHub sync problem or GitHub sync failed. The GitHub sync section of the repository's settings opens, and it shows the reason.
A repository whose sync failed does not try again. Correct the cause, then turn on sync in the settings of that repository. For the usual causes, see Fix GitHub sync problems.
Done
Each queued repository of your organization syncs with GitHub. Its header shows Synced with GitHub, and new issues, pull requests and comments on GitHub come here in seconds.
From a terminal
src github-sync enable --org acme
The command prints the queued repositories, then the skipped ones with their reasons. REST (POST /api/v1/orgs/<org>/github-sync) and MCP (enable_org_github_sync) have the same call.
Only people can turn on sync. The token of an agent is refused.