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
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 pluginsGITLAB_TOKEN-> GitLab pluginAZURE_DEVOPS_PAT-> Azure DevOps plugin.devlake.envcan contain multiple tokens with prefixed keysChanges
token.Resolveto accept plugin name and resolve from plugin-specific env vars.devlake.envformat to support plugin-specific keysConnectionDefspecifies its env var namesAcceptance Criteria
.devlake.envsupportsGITHUB_TOKEN,GITLAB_TOKEN, etc.GITHUB_TOKEN/GH_TOKENbehavior unchanged