Summary
Add Slack as a supported DevOps tool in the CLI. Slack is the dominant workplace messaging platform, and its DevLake plugin collects channel message data useful for measuring communication patterns, incident response coordination, and team collaboration metrics.
Upstream Plugin
slack in incubator-devlake/backend/plugins/slack/
| Property |
Value |
| Plugin slug |
slack |
| Auth |
AccessToken (OAuth access token) |
| Scope type |
Channels (SlackChannel) |
| Scope ID field |
id |
| Default endpoint |
https://open.slack.cn/open-apis/ |
| Remote-scope API |
Yes — lists and searches channels with cursor-based pagination |
| Connection test |
Yes |
Dependencies
Blocked by:
Not blocked by #85 — Slack uses AccessToken, compatible with current auth model.
Changes
- Add
ConnectionDef for slack in connectionRegistry:
Endpoint: "https://open.slack.cn/open-apis/"
SupportsTest: true
TokenPrompt: "Slack Bot/User OAuth token"
EnvVarNames: []string{"SLACK_TOKEN", "SLACK_BOT_TOKEN"}
EnvFileKeys: []string{"SLACK_TOKEN", "SLACK_BOT_TOKEN"}
ScopeIDField: "id"
ScopeFunc: scopeSlackHandler
- Implement
scopeSlackHandler:
- Use
client.ListRemoteScopes("slack", connID, "", "") to list channels
- Use
client.SearchRemoteScopes("slack", connID, search, ...) for search
- Let user select channels interactively
- PUT selected channels as scopes
- Set
Available: true
Acceptance Criteria
Summary
Add Slack as a supported DevOps tool in the CLI. Slack is the dominant workplace messaging platform, and its DevLake plugin collects channel message data useful for measuring communication patterns, incident response coordination, and team collaboration metrics.
Upstream Plugin
slackinincubator-devlake/backend/plugins/slack/slackSlackChannel)idhttps://open.slack.cn/open-apis/Dependencies
Blocked by:
ScopeIDField)Not blocked by #85 — Slack uses AccessToken, compatible with current auth model.
Changes
ConnectionDefforslackinconnectionRegistry:Endpoint: "https://open.slack.cn/open-apis/"SupportsTest: trueTokenPrompt: "Slack Bot/User OAuth token"EnvVarNames: []string{"SLACK_TOKEN", "SLACK_BOT_TOKEN"}EnvFileKeys: []string{"SLACK_TOKEN", "SLACK_BOT_TOKEN"}ScopeIDField: "id"ScopeFunc: scopeSlackHandlerscopeSlackHandler:client.ListRemoteScopes("slack", connID, "", "")to list channelsclient.SearchRemoteScopes("slack", connID, search, ...)for searchAvailable: trueAcceptance Criteria
gh devlake configure connection add --plugin slackcreates a Slack connectiongo build ./...,go test ./...,go vet ./...pass