TL;DR: The Sharkly GitLab integration links a GitLab project to a Sharkly Space. Issues sync into tasks (title, description, state and comments), you assign a task to an AI agent, and the merge request the agent opens links back to the task when its title, description or branch name carries the task ID. gitlab.com connects with OAuth; self-hosted GitLab connects with a personal access token.
Your bugs live in GitLab, next to the code. Your AI coding agents take work from a board. The Sharkly GitLab integration closes that gap: a GitLab issue becomes a task an agent picks up, and the merge request comes back linked to it. This guide covers gitlab.com and self-hosted setup, then walks through an example of linking an issue to a merge request.
Follow these steps on a connected project to set up issue sync, configure a webhook and give your agent a task ID rule. Sharkly is free to start, so you can follow along on your own project.
What the Sharkly GitLab integration connects
The integration has two halves that you switch on separately. Issue sync keeps a GitLab project and a Sharkly Space in step. Merge request and commit linking attaches code activity to tasks and posts a task link back on GitLab.
Both halves come in two flavors under Settings → Integrations: GitLab.com and GitLab Self-host. The two connections are independent, so you bind the one your code lives on.

| What you configure | What the integration does |
|---|---|
| Issue sync | Links a project and Space and syncs issue titles, descriptions, states and comments. |
| Personal GitLab account | Matches GitLab identities to Sharkly members. The GitLab.com page describes issue and comment attribution and two-way assignee mirroring. |
| Merge request and commit linking | Uses GitLab webhook events to link code activity to tasks. With linkbacks enabled, Sharkly posts the task link on GitLab. |
The Cancel Anything walkthrough did not test which comment edits or replies sync in each direction. Check that behavior on a test issue before relying on it.
Before you start
You need four things in place:
- A Space for the work. If you don’t have one, the Spaces setup guide covers it.
- An AI agent in the organization that can take tasks. See how Sharkly agents work.
- A connected Computer where that agent runs and clones the code. The Computers explainer shows how to register one, and repository setup tells the agent which repo to work in.
- GitLab permissions. On
gitlab.com, an Organization Owner or Admin in Sharkly does the connection. On self-hosted GitLab, the token’s account needs the Maintainer role or higher in every project you sync (GitLab roles reference), because it creates webhooks and posts comments.
Step 1: Connect gitlab.com with OAuth
Open Settings → Integrations. Under Git repositories, click Set up GitLab.com.
The page opens on a Connection block with two parts:
- Connect GitLab app. Click Connect and approve the OAuth screen on
gitlab.com. Until you do, the page reads “No GitLab app connected yet.” - Personal GitLab account. Each member clicks Connect here once. The GitLab.com settings describe this as attributing your GitLab issues and comments to you and mirroring assignees both ways.

Skip part 2 and sync still works. Unmatched GitLab users show up as external accounts: GitLab identities that take no seat and can’t sign in. Link them to members later under People → External accounts.
Step 2: Connect a self-hosted GitLab instead
A self-hosted instance doesn’t use OAuth. Click Set up GitLab Self-host and an admin fills in the connect dialog:
- GitLab URL: the root address you open in the browser, such as
https://gitlab.your-company.com. - Personal access token with the
apiscope. Create it in your GitLab user settings (GitLab token docs). A dedicated bot account keeps the connection alive when people leave. - Private-network proxy, if the instance sits on an intranet the cloud can’t reach. Pick an online Computer that can open the GitLab address; Sharkly then reaches GitLab through that Computer.

After you click connect, the page shows the token’s expiry date and the proxy Computer in use. When the token nears expiry, the page asks you to replace it so sync and linkbacks keep running.

Members can bind their own token on the same page; it’s used only for their comments and assignee sync.
Step 3: Turn on issue sync for your Space
Back on the GitLab page, scroll to Sync issue data. Under Sync links, click New sync and link a GitLab project to a Space. The button stays disabled until the organization connection from step 1 or 2 exists.

GitLab Self-host settings. Look for the disabled New sync button and the separate Issue linkbacks switches.
Two behaviors matter on day one:
- Sync starts from now. It picks up issue changes made after you turn it on.
- Old issues come in on request. Tick Import historical data when you create the sync, or do it later from the sync settings.
Below that sit Issue linkbacks switches for private and public projects. With them on, Sharkly comments the task link on the GitLab issue a task was synced from, so anyone reading the issue can jump to the agent’s work.
To try the workflow after connecting, file a test issue such as “CLI exits 0 when the cancel request fails.” Check your Space for the synced task and confirm its title and description.
Step 4: Hand the synced task to an AI agent
Open the new task and set an agent as the assignee. When the agent starts a run, check the task for progress and confirm it uses the repository you configured. The guide to task statuses and agent runs explains what each status means while it works.
Step 5: Link merge requests back to the task
Code linking needs a project webhook. In GitLab Self-host, click the yellow Webhook required row under Link Git PRs & commits to Sharkly tasks to open the setup guide. On GitLab.com, the unconnected page can show a compact Webhook control instead of the expanded linking panel pictured below. Open Webhook if you see it, or click Webhook required when the full panel is visible.
- In the GitLab project, open Settings → Webhooks (GitLab webhook docs).
- Paste the URL and Secret shown in Sharkly’s setup guide on the integration page.
- Select Push events and Merge request events.

GitLab Self-host settings. Look for the yellow Webhook required row above the merge request and commit switches.
Linking several projects? A group-level webhook saves time, but it needs GitLab Premium or Ultimate. On Free, add the same URL and Secret to each project. Treat both values like passwords.
Then pick what links. Link merge requests is on by default; Link git commits is a separate switch. Linking works by keyword: put the task ID in the merge request’s title, description or source branch name. Suppose your synced task has the example ID CAAN-14. With the webhook and merge request linking enabled, you can reference that ID in any of these places:
Fixes CAAN-14
Part of CAAN-14
fix/CAAN-14-cancel-exit-code
Agents won’t add the ID unless you tell them. The integration page suggests a rule for your agent’s instruction file, and it’s worth copying:
## Git conventions
- End every commit message and merge request title with the Sharkly task ID, for example "(CAAN-14)".
- Name branches <type>/<TASK-ID>-<short-slug>.
Put it in AGENTS.md or CLAUDE.md at the repo root. The agent Git settings guide covers the branch and commit options on the agent side.

With Pull request linkbacks on, Sharkly also comments the task link on the merge request, so a GitLab reviewer sees which task produced the change.
Common problems and fixes
- The self-host page asks for an administrator connection first. Members can’t bind personal tokens until an admin finishes the organization connection.
- “The GitLab address cannot be reached.” The instance is on a private network. Select a proxy Computer, or check that the chosen Computer’s network can open the address.
- Token errors. The page names the cause: invalid token, missing
apiscope, a redirecting address, or an unreachable host. Fix that and reconnect. - Merge requests don’t link. Check the webhook has both event types, and that the task ID appears in the title, description or branch name.
- Disconnecting. It stops the sync and links only. Your code, merge requests and issues on GitLab stay as they are.
Two other ways teams use it
An internal platform team on self-hosted GitLab. Their instance lives behind the VPN, so they register one Computer inside the network as the proxy and connect with a bot account’s token. Support files issues in GitLab; agents pick them up in Sharkly, and Sharkly reaches the instance only through that one Computer.
An open-source maintainer on gitlab.com. They sync the public project with Import historical data ticked, triage the backlog in Sharkly, and turn on public-project linkbacks so contributors can follow each fix from the issue to the agent’s merge request.
Recap checklist
- [ ] Space, agent and Computer exist, and the repo is set up
- [ ]
GitLab.comapp connected, or self-hosted connected with anapitoken (plus proxy Computer if needed) - [ ] Members bound their personal GitLab accounts
- [ ] New sync created; historical import decided
- [ ] Webhook added with Push events and Merge request events
- [ ] Task-ID rule added to
AGENTS.mdorCLAUDE.md - [ ] Linkback switches set for private and public projects
Conclusion
Start with one GitLab project and sync a test issue into your Space. Confirm that a merge request links to the Sharkly task when the webhook delivers its event and the request contains a matching task ID. Check the integrations overview and the GitLab help page for the current setup details, then start free on Sharkly and connect your first project.
FAQ
Does Sharkly support self-hosted GitLab?
Yes. Connect it with a personal access token that has the api scope. If the instance is on a private network, choose an online Computer as the proxy and Sharkly reaches GitLab through it.
What token scope does the Sharkly GitLab integration need?
The api scope. The account behind the token also needs the Maintainer role or higher in each synced project, because it creates webhooks and posts linkback comments.
Does issue sync import my existing GitLab issues?
Only if you ask. Sync picks up changes made after it starts; tick Import historical data when you create the sync, or later in its settings.
How does a merge request get linked to a Sharkly task?
Put the task ID in the merge request’s title, description or source branch name, and make sure the project webhook sends Merge request events. For a task with the example ID CAAN-14, both “Fixes CAAN-14” and a bare “CAAN-14” match.
Can I use one webhook for many GitLab projects?
A group-level webhook covers many projects, but it needs GitLab Premium or Ultimate. On Free, add the same URL and Secret to each project.
Does disconnecting GitLab delete tasks or code?
No. Disconnecting stops the sync and links. Code, merge requests and issues on GitLab are untouched.



