Connect GitLab Issues: step-by-step guide
Opens one GitLab issue per failing test, with your Tickets labels, adds a note when the test fails again, and closes it when the test passes clean. Works with gitlab.com and a self-managed GitLab over https. The issue names the evidence folder; files are not uploaded. This guide takes you from nothing to a verified connection, and lists the errors you can meet with their cause and fix.
Last updated:
Keep your credentials private. Never paste a token, key, password or webhook URL into a chat. Type it only in Studio → Settings → Integrations, where it is saved in your workspace's .env file and shown as dots. The same goes for an AI assistant: it can walk you through this guide, but it never needs your token.
What you need
- A GitLab project with Issues turned on.
- A personal or project access token with the api scope, from an account or token whose role in the project can create, comment on, close and reopen issues (Planner or higher).
- The project's path, like my-group/my-project, or its numeric ID.
- For a self-managed GitLab: its https address.
Get the credentials
- Personal token: in GitLab, open your avatar → Edit profile → Access → Personal access tokens and add a new token. Project token: open the project → Settings → Access tokens → Add new token (needs Maintainer or Owner) and give it at least the Planner role.
- Name it, set an expiry, and select the api scope. read_api is not enough: it cannot write.
- Create the token and copy it now. GitLab shows it once.
Connect it in the Studio
- In the Studio, open Settings → Integrations → GitLab Issues.
- Paste the token in
GITLAB_ISSUES_TOKENand the project path inGITLAB_ISSUES_PROJECT, turn onGITLAB_ISSUES_ENABLEDand press Save changes. - Self-managed GitLab only: set its address, like https://gitlab.example.com, in CI/CD → Runners & tokens (
GITLAB_URL). Empty means gitlab.com. - Open the Tickets page. Under Where, pick + Add a destination → GitLab Issues, then press save tickets.
Check that it works
- There is no test ticket for GitLab Issues: run a test that fails. The run log shows "[GitLab Issues] #<number> filed".
- Open the issue in GitLab and check its labels. Run the test again so it passes: the issue gets a note and is closed.
Common errors
| What you see | Cause | Fix |
|---|---|---|
"[GitLab Issues] needs GITLAB_ISSUES_TOKEN, GITLAB_ISSUES_PROJECT and an https GITLAB_URL: nothing filed" | The token or project is empty, the project is not a path or number, or GITLAB_URL is not https. | Fix the field it names. For gitlab.com leave GITLAB_URL empty. |
| "POST issues answered HTTP 401" | The token is wrong, expired or revoked. | Create a new token with the api scope and save it again. |
| "POST issues answered HTTP 403" | The token has read_api only, or its role cannot create issues in this project. | Use the api scope, and a role of Planner or higher in the project. |
| "POST issues answered HTTP 404" | The project path is wrong, Issues are off in the project, or the token cannot see it. | Copy the path from the project's address and check that Issues are on. |
| "PUT issues/<n> answered HTTP 403" when a test passes | The role can create issues but not close them (a Guest only closes issues it authored or is assigned to). | Give the token's account or the project token the Planner role or higher. |
| Everything is saved, but no issue appears | GITLAB_ISSUES_ENABLED is off, the GitLab Issues destination is missing or unticked on the Tickets page, the Tickets rules skip this test, or it was a sandbox run. | Check the switch, the destination under Where, and the rules under When. |
Settings keys
| Key | What it does | Valid value | How to check it |
|---|---|---|---|
GITLAB_ISSUES_ENABLED | Open GitLab issues for failures | true or false | Turn on, add the GitLab Issues destination on the Tickets page, then run a failing test. |
GITLAB_ISSUES_TOKEN | GitLab token for issues (secret, saved only on this computer) | One line, no quotes, no spaces; a token with the api scope | HTTP 401 in the run log means the token is wrong, expired or revoked. |
GITLAB_ISSUES_PROJECT | GitLab project for issues | group/project (subgroups allowed, up to 5 levels) or the numeric project ID | HTTP 404 in the run log means the project path is wrong or the token cannot see it. |
GITLAB_URL | GitLab address (self-managed only) | https://<your GitLab> with no user:password@; empty = https://gitlab.com | An http address is refused: the token is only ever sent over https. |
More: all integrations, the Settings guide, troubleshooting. Other guides: Jira Cloud, Azure Boards, Slack, Microsoft Teams, Telegram, GitHub Issues, Linear, PagerDuty, TestRail, Ticket webhook, Tickets.
Still stuck? Write to support@nexusstudioqa.com with the exact error line the Studio shows. Do not include a token.