Skip to content

feat(gitlab): filter GitLab search by person through their verified email - #10547

Open
waleedlatif1 wants to merge 1 commit into
stagingfrom
feat/gitlab-involving
Open

waleedlatif1 wants to merge 1 commit into
stagingfrom
feat/gitlab-involving

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • GitLab live search honors involving: issues and merge requests the person authored or is assigned to, merge requests they review, and commits they authored. Code and wiki have no author and are excluded (and refused when asked for under a person filter)
  • involving: me is the viewer's own verified organization email, never the source's service account. Another person is named by email
  • A person is resolved by the source's administrator token: exactly one active, unlocked user whose confirmed primary email matches (shared verifiedGitLabEmail from the GitLab permissions module), plus their confirmed secondary emails. Public profile emails never name a person; a non-administrator token gets a clear error
  • Issues and merge requests: one listing per role (author_id, assignee_id, and reviewer_id for merge requests), project or group scoped, merged without duplicates in update order; the cursor continues every role so no item of a page is skipped
  • Commits: one listing per verified email (GitLab filters by author), merged by SHA newest first, rows kept only when their author email is one of the person's; commit person searches always list within a project, and group searches move on to their projects
  • userTokenEmail in lib/knowledge/access/tokens.ts reads the email back out of an identity token instead of slicing it by hand

Type of Change

  • New feature

Testing

  • bun run --cwd apps/sim test lib/sim-search connectors/gitlab lib/knowledge/access: 62 files, 761 tests pass
  • New tests, each shown red by reverting its guard: verified-primary-email matching (inactive, unconfirmed, locked, ambiguous, non-admin token), secondary emails only when confirmed, role listings incl. reviewer and continuation, authored-kinds only, commit author-email filtering, me maps to the viewer's email
  • gitlab-federated.integration.ts: filters issues by the assignee's email against the disposable self-hosted GitLab fixture (runs only with GITLAB_LIVE_FIXTURE_FILE)
  • bun run lint, bun run generate (no drift), check:comment-hygiene, check:test-patterns, check:utils, check:explicit-any, check:organization-egress, check:boundaries; full type-check and audits left to CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Dec 1, 2026 9:14am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/sim-search/live/gitlab.ts Resolved
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · No new blocking issue was established in this review.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No new blocking issue was established in this review.

Summary

Adds verified-email person filters to GitLab live search.

  • GitLab search returns items linked to the person you name.

The previous and current commits have different merge bases with the target commit, so this review covered the full PR.

Reviews (3) · Last reviewed commit: "feat(gitlab): filter GitLab search by pe..." · Reviewed by Greptile

Comment thread apps/sim/lib/sim-search/live/gitlab.ts Resolved
Comment thread apps/sim/lib/sim-search/live/gitlab.ts Resolved
Comment thread apps/sim/lib/sim-search/live/gitlab.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/sim-search/live/gitlab.ts Resolved
Comment thread apps/sim/lib/sim-search/live/gitlab.ts Resolved
Comment thread apps/sim/lib/sim-search/live/gitlab.ts Resolved
Comment thread apps/sim/lib/sim-search/live/gitlab.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 8 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

This branch was previously deployed

1 inactive deployment
Preview — bb998388 Deployed Dec 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant