Skip to content

feat: add kilo for slack gitlab support#559

Open
dennismeister93 wants to merge 2 commits intoKilo-Org:mainfrom
dennismeister93:feat/add-kilo-for-slack-gitlab-support
Open

feat: add kilo for slack gitlab support#559
dennismeister93 wants to merge 2 commits intoKilo-Org:mainfrom
dennismeister93:feat/add-kilo-for-slack-gitlab-support

Conversation

@dennismeister93
Copy link
Contributor

Summary

  • Add GitLab repository support for Kilo for Slack bot
  • Include GitLab projects alongside GitHub repositories in Slack bot system prompt context
  • Extend spawn_cloud_agent tool to accept gitlabProject parameter for GitLab Cloud Agent sessions
  • Support GitLab OAuth and PAT tokens for Cloud Agent session spawning via Slack
  • Handle self-hosted GitLab instances and nested group paths (e.g., group/subgroup/project)

Notes

  • GitLab sessions use gitUrl/gitToken params (existing Cloud Agent API fields) instead of githubRepo/githubToken
  • Token retrieval leverages existing helpers: getGitLabTokenForOrganization, getGitLabTokenForUser, buildGitLabCloneUrl
  • The spawn_cloud_agent tool schema now requires only prompt (not githubRepo); exactly one of githubRepo or gitlabProject is validated in code
  • Owners can have both GitHub AND GitLab connected — the bot presents both sets of repos and the LLM selects the correct platform

Testing / Reproduce Steps

Prerequisites

  1. A Slack workspace with the Kilo bot installed
  2. Both GitHub and GitLab integrations connected to the same owner (user or org)
  3. ngrok tunnel (or any other) to expose localhost to Slack (ngrok http 3000)
  4. Environment variables: SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, SLACK_SIGNING_SECRET, APP_URL_OVERRIDE

Steps

  1. Connect GitLab to your account/org at /integrations/gitlab (via OAuth or PAT)
  2. Ensure Slack is connected at /integrations/slack
  3. @mention the bot in Slack: @KiloBot what repos do I have?
  4. Verify: Response should list both GitHub repositories AND GitLab projects
  5. Ask the bot to work on a GitLab project: @KiloBot fix the README in group/project
  6. Verify: Bot should spawn a Cloud Agent session using gitUrl/gitToken (check logs for [SlackBot] GitLab session - project:)
  7. Ask about a GitHub repo to confirm the existing path still works: @KiloBot update the docs in owner/repo
  8. Verify: Bot should spawn using githubRepo/githubToken as before

@dennismeister93 dennismeister93 marked this pull request as ready for review February 25, 2026 13:28
@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Feb 25, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src/lib/slack-bot.ts 313 Missing GitLab project access boundary enforcement before clone URL construction
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
None N/A None
Files Reviewed (3 files)
  • src/lib/slack-bot.ts - 1 issue
  • src/lib/slack-bot/gitlab-repository-context.ts - 0 issues
  • src/lib/slack-bot/gitlab-repository-context.test.ts - 0 issues

Fix these issues in Kilo Cloud

@dennismeister93 dennismeister93 force-pushed the feat/add-kilo-for-slack-gitlab-support branch from d09268a to f189e04 Compare February 25, 2026 15:27
@dennismeister93 dennismeister93 force-pushed the feat/add-kilo-for-slack-gitlab-support branch from 78e2aed to 67988ed Compare February 26, 2026 08:30
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