SyncAll

Learn how to sync org repos with SCM.

Endpoint

GET  /api/v1/scm/orgs/:org/sync

Parameters

The following parameters are used to configure the endpoint:

NameDescription
orgname of organization

Responses

Status CodeDescription
200indicates the request has succeeded
401indicates the user does not have proper permissions

Description

The sync-all endpoint allows users to re-align their organization’s repositories in Vela with their 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-all endpoint 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"

hitting the sync-all endpoint should re-configure the SCM webhook for all repos in the organization to only send events that are allowed. Once aligned, you should not have to hit this endpoint again, even if the subscribed events are changed.

Sample

Request

curl \
  -X PATCH \
  -H "Authorization: Bearer <token>" \
  "http://127.0.0.1:8080/api/v1/scm/orgs/github/sync"

Response

org "github" synced
Last modified October 27, 2023: Update syncAll.md (#385) (96e0e032)