Skip to main contentInstalling Mayil’s GitLab integration
Follow these steps to link GitLab to a deployed Mayil instance
1. Install Mayil-bot on GitLab
Mayil is installed at the Group level. To learn more, see docs.gitlab.com/integration.
- Go to the desired group.
- On the left sidebar, select
Settings > Applications.
- Select
Add new application
- Enter
Mayil-bot under Name.
- Under URI, enter
<mayil-deployment>/gitlab/auth where <mayil-deployment> is the url in which your mayil deployment can be found (such as mayil.examplecompany.com or companyname.mayil.ai)
- Select only the
read_repository OAuth 2 scope.
- Select Save application. GitLab provides:
-
The OAuth 2 Client ID in the Application ID field.
-
The OAuth 2 Client Secret, accessible by selecting Copy in the Secret field.
-
The Renew secret function
-
The redirect uri you provided
Save these details for the next step.
2. Authenticate Mayil’s backend using OAuth 2.0
We will need to manually authenticate Mayil’s backend to work with our newly installed application. For more details, see docs.gitlab.com/authorization
-
Construct this link using the details we got from the previous step-
https://<GITLAB INSTANCE>/oauth/authorize?client_id=<APP_ID>&redirect_uri=<REDIRECT_URI>&response_type=code&state=STATE&scope=read_repository
-
Open the above constructed link in a browser and follow the authentication steps.
-
You should be redirected to Mayil’s deployment and see a
{"status": "gitlab authenticated"} message.
This completes setting up Mayil’s GitLab integration
Deleting Mayil’s GitLab integration
- On the left sidebar, select
Settings > Applications
- Open
Mayil-bot and select Destroy