Save queries and version-control them directly to your GitLab project
Have you ever written what you thought was a one-time query, only to have to re-create it from memory a few weeks later? Or have you ever found yourself needing a previous version of a query you wrote?
By connecting your GitLab project to superQuery, you'll effectively create a query library — a place for saving, updating, and tracking changes in your queries.
Let's see how to set this up below.
Step #1: Authorize superQuery access to your GitLab account
Click on the "Source Control" icon in the lower-left corner of your navigation panel, and select "Connect to GitLab"
Next, choose your deployment option and click "Connect".
Connecting to a self-hosted GitLab Instance
If you are connecting to a self-hosted GitLab instance, you will need two things:
Host domain IP/DNS
Personal Access token
To generate a Personal Access Token, sign in to your GitLab instance and go to Settings.
Next, select "Access Tokens" from the left-hand menu.
Name your token, set an expiration date if you'd like, and under "Scopes" select API.
Finally, click "Create personal access token" at the bottom, copy your token, and paste it into the "Access Token" text box in superQuery.
Connecting to a GitLab-hosted instance
After clicking "Connect", GitLab will open and request authorization for superQuery to use your account.
Once you see the message shown below, click "Authorize".
Step #2: Select a GitLab project
Note: This step is for users who connect to a GitLab-hosted project.
Once you give authorization, the next step is to select the GitLab project you'd like to connect to.
A few seconds after selecting it, you should see a success message:
Step #3: Run a query
Once your project is connected, you're all set to start committing queries to GitLab!