GitHub integration

The Serverless Logic Web Tools implements a web version of a git client, allowing users to clone, create, commit, push and pull repositories, making it possible to sync workspaces remotely.

This document describes how to configure the integration and sync your projects.

Setting up your GitHub token

Generate a token from your GitHub account settings page and add it to the Serverless Logic Web Tools settings tab.

Prerequisites
  • GitHub account.

Procedure
  1. In the Serverless Logic Web Tools, click on the Cog wheel (⚙️) on the top right corner and go to the GitHub tab;

  2. From there, you’ll see a link to the GitHub token settings page and the Token field;

  3. Click the link and create your GitHub token, making sure you select at least the repo option. Optionally select gist as well, as it will give you the ability to import and update gists;

  4. Copy the token generated and paste it into the GitHub settings tab on the Serverless Logic Web Tools;

  5. The contents of the tab should be updated, showing that you’re signed into GitHub and have all the permissions required.

Syncing your workspaces with GitHub

After configuring your GitHub token you can now sync workspaces with remote repositories.

Prerequisites
  • You have configured your GitHub token on the Serverless Logic Web Tools.

Procedure
  1. Create or open a workspace;

  2. Add or edit files;

  3. Click Share → Github: Create Repository;

  4. Name your repository and select if it’s going to be Public or Private;

  5. Selecting the Use Quarkus Accelerator option will create a repository with a base Quarkus project, moving the workspace files to src/main/resources.

    serverless logic web tools github repo
    Figure 1. Creating a repository for your workspace
  6. To update the remote repository with your local changes click on Sync → Push;

  7. To get new updates from the remote repository click on Sync → Pull;

Currently, the tool cannot resolve merge conflicts, so make sure to always pull new changes before working on your files.

Importing a workspace from GitHub

Let’s say you need to work from another computer or use a workspace created by someone else, in these cases importing a workspace from GitHub is useful. In this tutorial, you’ll learn how to import these repositories as workspaces on Serverless Logic Web Tools.

Prerequisites
  • You have configured your GitHub token on the Serverless Logic Web Tools;

  • Have a repository with Serverless Logic files.

Procedure
  1. On GitHub, find the repository with your project and copy its URL;

  2. Back on the Serverless Logic Web Tools, paste the URL to the Import → From URL field and click on Clone;

  3. The page should load your imported project, defaulting to a Serverless Logic file, if present;

  4. If your GitHub user has access to push to this repository you’ll be able to sync changes by clicking on Sync → Push;

Found an issue?

If you find an issue or any misleading information, please feel free to report it here. We really appreciate it!