Skip to main content

Sync

Command

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

For more information, you can run vela sync repo --help.

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
tip

This command also supports setting the following parameters via a configuration file:

  • org
  • repo

For more information, please review the CLI config documentation.

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

warning

This section assumes you have already installed and setup the CLI.

To install the CLI, please review the installation documentation.

To setup the CLI, please review the authentication documentation.

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