Sync

Learn how to sync repos in database with GitHub.

Command

$ vela sync repo <parameters...> <arguments...>

Parameters

The following parameters are used to configure the command:

NameDescriptionEnvironment Variables
orgname of organization for the repositoryVELA_ORG, REPO_ORG
reponame of repositoryVELA_REPO, REPO_NAME
allbool flag to sync all repos in an orgVELA_SYNC_ALL, SYNC_ALL

Description

The sync command allows users to re-align their repository in Vela with its SCM mirror. This discrepancy can come in the form of a repository that has been deleted from the SCM but not in Vela.

Further, as of v0.19.0, the sync command can be used to adjust events that are sent to Vela from the SCM that the Vela-instance of the repo is not subscribed to. For example, if your audit page has errors like

"unable to process webhook: <org>/<repo> does not have comment events enabled"

running the sync command should re-configure the SCM webhook to only send events that are allowed. Once aligned, you should not have to run this command again, even if the subscribed events are changed.

Samples

Request

$ pwd
~/github/octocat
$ vela sync repo

Targeted Request

$ vela sync repo --org github --repo octocat

Response

repo "github/octocat" synced

Request

$ pwd
~/github/octocat
$ vela sync repo --all

Targeted Request

$ vela sync repo --org github --all

Response

org "github" synced