Git integration

Default branch becomes locked

When connected to a git repository, the default branch becomes read-only. You have to create branches to make changes and apply them via pull-requests. The default branch is automatically up-to-date with merges happening on the git repository.

Components.studio offers Git integrations to four different providers:

github, gitlab, azure and bitbucket logo presented in a row for selecting a provider

Set-up

You can use any of these providers to create a repository and Components.studio will complete the set-up upon creation, either via registering webhooks on your repository, or via the provider's app installation (i.e. Github).

Token usage

We have defined and set up different OAuth clients for each provider in Components.studio.

Components.studio uses each of these Oauth integrations to retrieve, generate and refresh tokens, in order to accomplish tasks on your behalf.

For Github: Components.studio uses the Github app's token.

You can revoke tokens at anytime, Components.studio will try to refresh with your authenticated user.

Git usage

Components.studio uses integrations as bare Git client, allowing you to:

  • Push a commit to a remote repository
  • Pull a branch from a remote repository
  • Hard reset of a branch from a remote repository

API Provider usage

  • List repositories for a specific provider
  • Get username of the user within a provider
  • Create and update a Pull/Merge request based on a commit
Window with a text area filled with a commit message and button for creating a pull request

Events usage

After correctly setting up your repository, Components.studio will automatically register webhooks (or application events for Github), in order to be notified of certain events.

Specifically, Components.studio will listen for:

  • Merge events
  • Pull/Merge request events

Merge events

Components.studio uses these events to keep your default branch up-to-date in Components.studio.

It will also allow you to:

  • Keep track of the baseline when you need to create a new branch inside Components.studio
  • Keep track of the baseline for visual screenshots

Once Components.studio receives a merge event from the configured Git provider on the default branch, Components.studio captures the sha of the default branch and Components.studio stores it, to be able to later fetch the default branch in c

Pull/Merge request events

Components.studio uses every create, update and delete events to populate the list of the Pull/Merge requests available inside Components.studio.