Skip to content

Per-plugin token resolution chain #15

Description

@ewega

Summary

Implement per-plugin token resolution from environment variables and env files, so each plugin can have its own credential without conflicts.

Design

  • GITHUB_TOKEN / GH_TOKEN -> GitHub and Copilot plugins
  • GITLAB_TOKEN -> GitLab plugin
  • AZURE_DEVOPS_PAT -> Azure DevOps plugin
  • .devlake.env can contain multiple tokens with prefixed keys
  • Token resolution chain per plugin: flag -> env file -> env var -> prompt

Changes

  • Extend token.Resolve to accept plugin name and resolve from plugin-specific env vars
  • Update .devlake.env format to support plugin-specific keys
  • Each ConnectionDef specifies its env var names

Acceptance Criteria

  • Each plugin resolves its own token independently
  • .devlake.env supports GITHUB_TOKEN, GITLAB_TOKEN, etc.
  • Prompt specifies which plugin's token is being requested
  • Existing GITHUB_TOKEN / GH_TOKEN behavior unchanged

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions