Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions docs/configure-connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Aliases: `connections`
| Flag | Default | Description |
|------|---------|-------------|
| `--plugin` | *(interactive)* | Plugin to configure (`github`, `gh-copilot`, `jenkins`, `circleci`, `gitlab`, `bitbucket`, `azuredevops_go`, `jira`, `pagerduty`, `sonarqube`, `argocd`) |
| `--org` | *(plugin-dependent)* | Organization/group/workspace slug (required for GitHub, GitLab, and Azure DevOps; optional for Copilot when `--enterprise` is provided) |
| `--org` | *(plugin-dependent)* | Organization/group/workspace slug (required for GitHub, GitLab, and Azure DevOps; for Azure DevOps, use the organization segment from `https://dev.azure.com/<org>`; optional for Copilot when `--enterprise` is provided) |
| `--enterprise` | | GitHub enterprise slug (Copilot only) |
| `--name` | `Plugin - org` | Connection display name |
| `--endpoint` | *(plugin default when available)* | API endpoint override (required for Jenkins, Azure DevOps, Jira, SonarQube, and ArgoCD because they have no default endpoint) |
| `--endpoint` | *(plugin default when available)* | API endpoint override (required for Jenkins, Azure DevOps, Jira, SonarQube, and ArgoCD because they have no default endpoint; for Azure DevOps, usually `https://dev.azure.com/<org>`) |
| `--proxy` | | HTTP proxy URL |
| `--token` | | Plugin PAT or API token (highest priority source). For BasicAuth plugins (Jenkins, Bitbucket), this is the password/app token. |
| `--username` | | Username for BasicAuth plugins (Jenkins, Bitbucket). Ignored for token-based plugins. |
Expand Down Expand Up @@ -58,11 +58,12 @@ Aliases: `connections`

For each plugin, the CLI resolves the PAT in this order (see [token-handling.md](token-handling.md) for the full guide):

1. `--token` flag
2. `.devlake.env` file — checked for plugin-specific keys:
- GitHub / Copilot: `GITHUB_PAT`, `GITHUB_TOKEN`, or `GH_TOKEN`
3. Plugin-specific environment variable (same key names, from shell environment)
4. Interactive masked prompt (terminal fallback)
1. `--token` flag
2. `.devlake.env` file — checked for plugin-specific keys:
- GitHub / Copilot: `GITHUB_PAT`, `GITHUB_TOKEN`, or `GH_TOKEN`
- Azure DevOps: `AZURE_DEVOPS_PAT` or `AZDO_PAT`
3. Plugin-specific environment variable (same key names, from shell environment)
4. Interactive masked prompt (terminal fallback)

### Username Resolution (BasicAuth plugins)

Expand Down Expand Up @@ -115,12 +116,23 @@ gh devlake configure connection --plugin github --org my-org \
# With proxy
gh devlake configure connection --plugin github --org my-org --proxy http://proxy:8080

# BasicAuth plugin (e.g. Jenkins)
gh devlake configure connection --plugin jenkins --username admin --token mypassword

# Interactive (no --plugin — prompts for everything)
gh devlake configure connection
```
# BasicAuth plugin (e.g. Jenkins)
gh devlake configure connection --plugin jenkins --username admin --token mypassword

# Azure DevOps connection
# --org is the organization segment from https://dev.azure.com/<org>
# --endpoint should usually match: https://dev.azure.com/<org>
gh devlake configure connection --plugin azuredevops_go --org my-azure-org \
--endpoint https://dev.azure.com/my-azure-org

# Azure DevOps via alias, with PAT from AZDO_PAT or AZURE_DEVOPS_PAT
export AZDO_PAT=my-pat
gh devlake configure connection --plugin azure-devops --org my-azure-org \
--endpoint https://dev.azure.com/my-azure-org

# Interactive (no --plugin — prompts for everything)
gh devlake configure connection
```

### Output

Expand Down
11 changes: 11 additions & 0 deletions docs/configure-scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ gh devlake configure scope add --plugin circleci --connection-id 4
# PagerDuty services (interactive)
gh devlake configure scope add --plugin pagerduty --connection-id 5

# Azure DevOps repos (interactive project + repo picker)
# Uses the saved connection's org and endpoint to discover projects and repos
gh devlake configure scope add --plugin azure-devops --org my-azure-org

# Interactive (omit all flags)
gh devlake configure scope add
```
Expand Down Expand Up @@ -149,6 +153,13 @@ gh devlake configure scope add
2. Prompts for one or more services to track
3. Calls `PUT /plugins/pagerduty/connections/{id}/scopes` with the selected services

### What It Does (Azure DevOps)

1. Uses the saved Azure DevOps connection's org and endpoint to discover remote scopes
2. Lists projects for that organization via the DevLake remote-scope API
3. Lets you pick one or more repos within those projects to collect
4. Calls `PUT /plugins/azuredevops_go/connections/{id}/scopes` with the selected repos

---

## configure scope list
Expand Down
Loading