Skip to content

[Feat] Handle @roomote mentions on GitLab issues#578

Merged
mrubens merged 2 commits into
developfrom
feat/gitlab-issue-note-mentions-1uy2ta930usx4
Jul 19, 2026
Merged

[Feat] Handle @roomote mentions on GitLab issues#578
mrubens merged 2 commits into
developfrom
feat/gitlab-issue-note-mentions-1uy2ta930usx4

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

Related issue

Internal P1: GitLab @roomote mentions on issues were a silent no-op.

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

What changed

GitLab Note webhooks now handle @roomote mentions on Issues, not only Merge Requests.

  • First mention starts a standard task linked to the GitLab issue and posts an acknowledgement note on the issue
  • A later mention on the same issue reuses/resumes that task instead of spawning a sibling
  • Issue reuse lookup is host-scoped (target.repo.host → payload sourceControlHost, with legacy-null tolerance) so same-namespace issues on different GitLab instances cannot cross-match
  • System notes and Roomote/bot-authored notes still stay filtered
  • Existing Merge Request mention → review-task flow is unchanged
  • Adds createGitLabIssueNote

How it was tested

  • pnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/api exec vitest run src/handlers/gitlab/__tests__/handleNote.test.ts (24 passed)
  • pnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/db exec vitest run src/lib/__tests__/github-branch-activity.test.ts -t "findReusableGitHubIssueTaskOwner" (6 passed)
  • Pre-push gates (oxlint, residual lint, check-types:fast, knip) passed on push

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

Route GitLab Issue note webhooks into standard-task launch/reuse so
@roomote mentions on issues are no longer silent no-ops.
@roomote-roomote

roomote-roomote Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

No new code issues found. See task

  • apps/api/src/handlers/gitlab/handleNote.ts:427 - Reuse lookup does not receive or apply target.repo.host; GitLab issues with the same namespace and IID on different instances can route follow-up work to the other instance's task. Thread the host into findReusableGitHubIssueTaskOwner and filter sourceControlHost with the existing legacy-null fallback.

Reviewed d8e9992

@roomote-roomote

roomote-roomote Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

Fixed host-scoping on GitLab issue task reuse.

findReusableGitHubIssueTaskOwner now accepts host and matches payload sourceControlHost (or legacy null). The GitLab issue mention path threads target.repo.host into both the reuse lookup and the launched payload.

Pushed in d8e9992

Pass repository host into findReusableGitHubIssueTaskOwner and filter
payload sourceControlHost so same-namespace issues on different GitLab
instances cannot reuse each other's tasks.
@mrubens
mrubens marked this pull request as ready for review July 19, 2026 12:14
@mrubens
mrubens merged commit a2621c9 into develop Jul 19, 2026
17 checks passed
@mrubens
mrubens deleted the feat/gitlab-issue-note-mentions-1uy2ta930usx4 branch July 19, 2026 12:14
@roomote-roomote roomote-roomote Bot mentioned this pull request Jul 19, 2026
8 tasks
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