This integration focuses on GitLab and is using GitLab API for interacting with the GitLab platform. It works with both SaaS (GitLab.com) and a self-hosted GitLab version.
Depending on what type of environment you want to use this integration in, the guide will slightly vary. The next section "Provider account setup" has 2 sets of instructions based on the type.
To set up a GitLab account for development, please take the following steps:
- Visit the GitLab Sign in and sign in/sign up using the method of your choice.
To set up a GitLab account for development, please take the following steps:
- Visit the GitLab installation section and install the software using your method of choice.
- The very first time you visit GitLab (depending on where it is installed, if locally you can visit it by navigating to http://localhost/), you will be asked to set up the admin password.
- After you enter the admin password, you can log in with username "root" and the password you set up.
Once you've created your account, you'll need to generate an API Key to access the GitLab API.
- First, click on your avatar (top-right) and select "Settings".
- From the left side menu, select "Access Tokens".
- Add a new personal access token by giving it a name, expiration (optional) as well as selecting the usage permissions based on your use case. Then click "Create person access token" below.
- You'll see your newly generated API key at the top of the page underneath "Your New Personal Access Token" field. It's shown only once, so make sure to save it somewhere or you'll need to re-create it again later.
- Copy the API Key, create a
.env
file at the root of this project, and set anPERSONAL_TOKEN
variable with the copied value.
PERSONAL_TOKEN="paste the personal token value here"
- The final step is to also include the hostname in the
.env
file. If you're using SaaS, the value you want to put inside is https://gitlab.com. However, if you're using a self-hosted approach, put the URL that points to it.
PERSONAL_TOKEN="paste the personal token value here"
BASE_URL="e.g. https://gitlab.com (or your custom hostname http://localhost")
After following the above steps, you should now be able to start contributing to
this integration. The integration will pull in the PERSONAL_TOKEN
and
BASE_URL
variables from the .env
file and use them when making requests.