Skip to main content
Dynamic repo discovery lets cops work out which Bitbucket repositories are in scope for a release by querying Jira’s dev-status API for each in-scope issue. You do not need to maintain a static list of repos in cops.project.json. For each discovered issue, cops:
  1. Fetches Jira dev-status artifacts (branch links, pull requests, deployment details)
  2. Extracts projectKey / repoSlug pairs from those artifacts
  3. Validates each repository exists in Bitbucket
  4. Enriches each repo with bambooPlans, deploymentEnvs, and deploymentLinks counts from the Jira deployment detail

Choosing a scope

Use a Jira fixVersion to select in-scope issues. This is the most common approach for planned releases.
cops release repos discover \
  --project my-service \
  --fixVersion 2026-04-17 \
  --issueTypes Story \
  --insecure
The command runs a JQL query of the form:
project = <projectKey> AND fixVersion = "<fixVersion>" AND issuetype in ("Story")
then calls the Jira dev-status API for each matching issue.To run aggregate release checks across all discovered repos:
cops release summary \
  --project my-service \
  --fixVersion 2026-04-17 \
  --discover \
  --insecure

Discovery output

Each discovered repository entry contains:
FieldTypeDescription
projectKeystringBitbucket project key
repoSlugstringBitbucket repository slug
issueCountnumberNumber of in-scope issues linked to this repo
issueKeysstring[]Sorted list of linked issue keys
validatedInBitbucketbooleanWhether cops confirmed the repo exists via the Bitbucket API
sourcestringdev-status (extracted from structured JSON) or dev-status-url (extracted from URL patterns)
bambooPlansstring[]Bamboo plan keys discovered from Jira deployment artifacts
deploymentEnvironmentsstring[]Deployment environment identifiers discovered from Jira deployment artifacts
deploymentLinksnumberTotal count of deployment links seen for this repo’s issues
Results are sorted by issueCount descending, so the most-referenced repositories appear first.

Example output (JSON)

cops release repos discover \
  --project my-service \
  --fixVersion 2026-04-17 \
  --issueTypes Story \
  --output json \
  --insecure
{
  "schemaVersion": "v1",
  "command": "release repos discover",
  "generatedAt": "2026-04-17T10:00:00.000Z",
  "count": 2,
  "metadata": {
    "issueCount": 14,
    "repoCount": 2,
    "scopeMode": "fixVersion",
    "totalBranchLinks": 18,
    "totalPullRequestLinks": 6,
    "totalDeploymentLinks": 4
  },
  "items": [
    {
      "projectKey": "MYTEAM",
      "repoSlug": "my-service",
      "issueCount": 11,
      "issueKeys": ["IP-101", "IP-102", "IP-103"],
      "validatedInBitbucket": true,
      "source": "dev-status",
      "bambooPlans": ["MYTEAM-PLAN"],
      "deploymentEnvironments": ["Staging#1001", "Production#1002"],
      "deploymentLinks": 3
    },
    {
      "projectKey": "MYTEAM",
      "repoSlug": "shared-lib",
      "issueCount": 3,
      "issueKeys": ["IP-104", "IP-105"],
      "validatedInBitbucket": true,
      "source": "dev-status",
      "bambooPlans": [],
      "deploymentEnvironments": [],
      "deploymentLinks": 1
    }
  ]
}

Aggregate checks with --discover

Adding --discover to release summary runs aggregate cross-repo checks on top of discovery:
cops release summary \
  --project my-service \
  --fixVersion 2026-04-17 \
  --discover \
  --insecure
The aggregate checks include:
CheckDescription
Release branch existenceEach discovered repo has a branch matching releaseBranch from the project config
Open PR thresholdNumber of open PRs targeting the release branch is within the configured limit
Latest build signalThe latest commit on the release branch has a passing build status
Bamboo plan coverageProportion of discovered repos with at least one linked Bamboo plan
Deployment environment coverageProportion of discovered repos with at least one linked deployment environment
If a discovered repo’s bambooPlans or deploymentEnvironments arrays are empty, it means cops found no deployment artifacts for that repo’s issues in Jira. This is expected for repos that are not yet wired up to Bamboo deployments.

Combining with filtering

The --issueTypes flag accepts a comma-separated list and filters issues before dev-status lookup:
# Only Story and Bug issues contribute to repo discovery
cops release repos discover \
  --project my-service \
  --fixVersion 2026-04-17 \
  --issueTypes Story,Bug \
  --insecure
The --maxIssues flag caps the total number of issues processed (default: 500) — useful for large fixVersions where you want a representative sample:
cops release repos discover \
  --project my-service \
  --fixVersion 2026-04-17 \
  --maxIssues 100 \
  --insecure

Build docs developers (and LLMs) love