GitLab
Connect GitLab to TaskForce with a personal access token, link a project and let issues flow in through webhooks. Learn what is imported and what is not.
The GitLab integration links GitLab projects to TaskForce projects. Once a project is linked and its webhook is in place, issues created or changed in GitLab appear as tasks in TaskForce, and comments on those issues appear on the tasks.
Who can use it
- Connecting, syncing and changing settings needs the Manage integrations permission. Viewing the connection needs View integrations.
- The Project Manager role template has both. Account Owner and Administrator have every permission.
- To let TaskForce create the webhook, the GitLab account you connect with needs the Maintainer or Owner role on the GitLab project.
- GitLab must be able to reach your TaskForce address over the internet. A workspace that runs on a local address cannot receive webhooks, and the page tells you to contact your workspace administrator.
- No server setup is needed: a personal token is enough. One-click sign-in is optional (see One-click sign-in).
Connect with a personal token
- In GitLab (GitLab.com or your own instance) select your avatar in the upper-right corner, then Edit profile.
- In the left sidebar select Access > Personal access tokens.
- From the Generate token dropdown select Legacy token.
- Enter a Token name (for example TaskForce) and an Expiration date. GitLab sets 365 days when you leave it empty. TaskForce stops syncing when the token expires, so paste a new one before then.
- Select the
apiscope, click Generate token and copy the token. GitLab shows it only once. - In TaskForce open Settings > Integrations > GitLab. For GitLab.com leave GitLab URL empty. For GitLab Self-Managed or Dedicated enter the https address of your instance. Paste the token into Personal access token and click Save Connection. The page shows Connected with a token.
A group or project access token with the api scope and the Maintainer role also works. You need the Maintainer or Owner role on every project you sync, so that TaskForce can manage its webhook.
The token is encrypted and never shown again. To replace it later, open the integration page, paste the new value and click Update Connection. Remove Connection unlinks all synchronized projects after you confirm. It does not revoke the credential at GitLab: delete it there if you want to cut access completely.
One-click sign-in (if available)
If your TaskForce operator has registered a GitLab OAuth application, the page also shows Connect with GitLab. GitLab asks you to sign in and click Authorize. TaskForce asks for the api and read_user scopes and renews the two-hour access tokens in the background. When no application is registered the button is not shown and the token form is all you need.
Sync and select projects
- Click Sync Projects to load the GitLab projects where you have at least the Maintainer role (archived projects are left out). Use Search projects… to filter the list.
- Click Sync next to a project to make it available to TaskForce. The button changes to Synced. Click it again to stop syncing that project.
- Click Configure Sync to open the settings of a synced project.
Link a TaskForce project
Synced GitLab projects can be linked to a TaskForce project in two ways:
- Existing project: open the project settings, go to Integrations and pick the project in Linked project. You can link one external project per integration.
- New project: click to create a project, choose the Import tab, pick GitLab as the Source, select the Source project, give the project a name and click Import & create.
Webhooks
Issues reach TaskForce through a GitLab project webhook. TaskForce manages one webhook per linked project with the Issue events (work item events) and Comments triggers. In Configure Sync the Webhook Management block shows its status (Configured, Drifted, Error or Not configured), the Callback URL, the time of the Last checked and any Missing Events.
Secure the webhook
- Click Generate Secret (or Rotate Secret if one exists) and confirm. Copy the secret straight away, it is shown only once. GitLab sends it in the
X-Gitlab-Tokenheader. - Click Reconcile Webhooks. TaskForce creates the webhook in GitLab, or updates the existing one so it uses the new secret, and replaces a webhook that GitLab has disabled. Reconcile refuses to run until a secret exists, and TaskForce rejects every delivery while no secret is set.
- Click Save Sync Settings.
Rotating a secret invalidates the previous one. Reconcile again afterwards.
GitLab disables a webhook after four failed deliveries in a row. If the status turns to Drifted or Not configured, click Reconcile Webhooks again.
With a personal token
- Webhooks are created when you click Reconcile Webhooks, using your token, so it needs the Maintainer or Owner role on the project.
- A self-managed GitLab must be reachable from TaskForce over a public https address, and TaskForce must be reachable from your GitLab. Hosts with a private certificate authority, http-only hosts and private-network hosts are rejected.
- If you switch between a token and one-click sign-in, click Reconcile Webhooks again.
What flows from GitLab to TaskForce
When a webhook arrives for a synced and linked project, TaskForce acts as follows.
| GitLab event | Result in TaskForce |
|---|---|
| Issue opened | A task is created. |
| Issue updated or closed | The task is created or updated. |
| Issue reopened | The task is updated and goes back to an open status. |
| Comment on an issue | The comment is added to the matching task. Edited comments and comments on merge requests, commits or snippets are ignored. |
| Issue deleted | Nothing: GitLab does not send an event for deleted issues. |
Tasks, incidents and other work item types arrive the same way as issues.
Fields that are copied on create and update:
| GitLab | TaskForce |
|---|---|
| Title | Task title |
| Description | Description |
State and workflow:: or status:: scoped label |
Status: closed issues are Closed. Open issues take the status that matches the scoped label (for example workflow::In progress becomes Active), otherwise New. |
| Type and labels | Type: incidents become Bug, epics become Epic, otherwise a bug, story, feature or epic label decides. Other issues become Task. |
priority::1 to priority::4 label |
Priority |
| First assignee | Assignee, matched by the public email of their GitLab profile |
| Time estimate | Effort |
| Time spent | Spent time |
| Due date | End date |
What flows from TaskForce to GitLab
- Tasks created through the AI task creation flow in a project that is linked to GitLab also create a GitLab issue with the task title and description. The task type is added as a label (
Bug,Story,FeatureorEpic) and the priority as apriority::Nlabel. - The Outbound Sync and Inbound Sync checkboxes are saved with the project settings. In the current release the webhook handling described above does not consult them, and edits, comments and time logged in TaskForce are not sent to GitLab.
Import existing work
To bring all existing issues into TaskForce in one pass, use the Import tab when creating a new project or the Import from an external project option in an existing project’s settings. See Import projects and tasks for details.
GitLab imports files uploaded in the issue description, but not files in comments.
Limitations
- There is no initial import of existing issues. Tasks appear when GitLab sends an event for them.
- Deleted issues are not removed from TaskForce.
- Confidential issues and their comments are not sent to TaskForce.
- One-click sign-in works with one GitLab instance per TaskForce installation (GitLab.com by default, or the host the operator configured). With a token each workspace enters its own GitLab URL.
- Personal access tokens do not refresh. When the token expires or is revoked, TaskForce shows that the token was rejected: create a new one and replace it on the integration page.
- The token needs the
apiscope and the Maintainer or Owner role on each synced project. - The GitLab URL must be a public https address. Private-network, http-only and private-CA hosts are not supported.
Optional: enable one-click sign-in (operators)
This is optional: TaskForce works with personal tokens without it. These steps are for the person who runs the TaskForce installation, once per installation, and add the Connect with GitLab button.
- In GitLab, register an OAuth application: Edit profile > Access > Applications > Add new application (or under a group’s Settings > Applications, or instance-wide under Admin > Applications on a self-managed GitLab).
- Name: TaskForce. Redirect URI:
https://<your TaskForce host>/api/integrations/gitlab/oauth/callback(the host isWEBHOOK_PUBLIC_URLwhen set, otherwiseAPP_URL). Keep Confidential checked. Scopes:apiandread_user. - Save, then copy the Application ID and Secret into the TaskForce environment:
GITLAB_CLIENT_ID=<Application ID>
GITLAB_CLIENT_SECRET=<Secret>
# Only for a self-managed GitLab; defaults to https://gitlab.com
GITLAB_HOST=https://gitlab.example.com
- Restart the application (and clear the config cache if you use it). The GitLab card becomes connectable.
Webhooks need no extra setup: TaskForce creates them per project at https://<your TaskForce host>/api/webhooks/gitlab?projectRef=... when a user clicks Reconcile Webhooks.