Skip to main content
The Aspect Workflows GitLab App is what lets the Aspect API call GitLab on your behalf. Link it once for your GitLab top-level group, and authenticated CLI features — GitlabCommitStatuses, GitlabStatusComments, and GitlabLintComments — start posting results to your merge requests. This page covers linking the App. For the account setup and the ASPECT_API_TOKEN your CI uses, see Authenticating the Aspect CLI.
Using GitHub? See the GitHub App for the equivalent.

What the App enables

Once linked, these CLI features can post to GitLab from your CI runs:
  • GitlabCommitStatuses — per-task pass/fail status on the commit under review (the rows GitLab shows in the MR’s “Pipelines” / commit status column).
  • GitlabStatusComments — a single rolling MR note that aggregates every task’s live status into one comment, updated as jobs complete.
  • GitlabLintComments — inline aspect lint findings posted as position-bound discussions on the MR diff, with one-click suggestion blocks. See aspect lint for behavior and config.
1

Have an Aspect account with the right role

Linking the App requires an Aspect account with the Account Admin or GitLab Integration Admin role. If you don’t have an account yet, or need a role assigned, see the account setup notes first.
2

Link the Aspect Workflows GitLab App to your GitLab top-level group

The Aspect Workflows GitLab App is an OAuth Application Aspect has already registered on gitlab.comyou don’t create or register anything on the GitLab side. The link flow walks you through the standard GitLab OAuth consent screen to authorize the existing Aspect App against the top-level group you own; that consent is what allows the Aspect CLI to call the GitLab API on your behalf.
Self-hosted GitLab is not yet supported — only gitlab.com works today. See Self-hosted GitLab below.
Use the panel below to start the consent flow:Two permissions are required to complete this step:
  • GitLab side: you must be an Owner of the top-level GitLab group you want the App to act on. GitLab gates api-scoped OAuth authorization on Owner role. No App installation or admin action is required on the GitLab side beyond selecting Authorize on the consent screen.
  • Aspect side: your Aspect account must have the Account Admin or GitLab Integration Admin role.
Behind the scenes the link flow:
  1. Sends you through the GitLab OAuth consent screen for scope=api read_api against the Aspect Workflows GitLab App.
  2. Captures the top-level groups you’re an Owner of (min_access_level=50) at consent time and stores them on your install record as ownedGroups.
  3. Sends you through the Aspect consent screen to bind the GitLab identity to your Aspect tenant.
Each Aspect tenant can carry multiple linked GitLab users (e.g. one user for each top-level group). When the CLI mints a token, the Aspect API picks the install whose ownedGroups covers the project’s top-level group.
3

Generate an Aspect API token for CI

With the App linked, generate an ASPECT_API_TOKEN and wire it into CI. Pick GitLab CI roles (covers GitlabCommitStatuses, GitlabStatusComments, and GitlabLintComments).See Generate an Aspect API token for the full walkthrough and the GitLab token roles and scopes table. The GitLab tab of that page’s .gitlab-ci.yml example shows the rules: clause both status features need — they gate on a merge-request pipeline.

When the features fire

All three features ship enabled by default in the Aspect CLI. They only post to GitLab when:
  1. A merge-request pipeline is running (CI_MERGE_REQUEST_IID present), and
  2. ASPECT_API_TOKEN is set with appropriate roles, and
  3. An Aspect Workflows GitLab App install exists that covers your project’s top-level group.
For an MR pipeline to be created at all, your project must have Settings → Merge requests → Pipelines for merge requests enabled, and your job’s rules: must allow merge_request_event (see the GitLab tab of the .gitlab-ci.yml example). GitlabLintComments additionally only fires on the aspect lint task when lint findings are routed to inline comments — see aspect lint › GitLab MR comments for its behavior, the suggestion/dedup/auto-resolve semantics, and the --gitlab-lint-comments:max-pr-comments cap. When any precondition is missing, the features skip silently and the underlying aspect command continues normally.
Storing ASPECT_API_TOKEN as a group-level CI/CD variable (rather than per-project) lets every project under the group pick it up automatically — useful when you’re rolling out across many repos at once.

Configuring the features

Common knobs (set in .aspect/config.axl):
.aspect/config.axl
Command-line overrides:

mode=always for local testing

Running locally against a real MR without a GitLab CI pipeline — useful when iterating on the integration. Set the override env vars in your shell, then run with mode=always:
These env vars are the same escape hatch used by Aspect Workflows when posting status back to GitLab from runners that don’t run inside GitLab CI directly.

Self-hosted GitLab

Only gitlab.com is supported today. Self-hosted GitLab instances (gitlab.example.com, GitLab Dedicated, etc.) cannot use the features on this page yet — the Aspect Workflows GitLab App is registered against gitlab.com. If self-hosted support would unblock you, please reach out so we can prioritize it.

Troubleshooting

If authentication is unavailable (missing credentials, App not linked for the project’s top-level group, or not an MR context), the features skip their work and the underlying aspect command continues normally. If MR notes or commit statuses aren’t appearing as expected, check the GitLab App installation (above panel) and ASPECT_API_TOKEN first.

Support

Hit a bug or have a feature request? Open an issue on aspect-build/aspect-cli. For questions or to chat with the team and other users, join our community Slack at slack.aspect.build.