Skip to content

Instantly share code, notes, and snippets.

@xenago
Last active March 25, 2026 18:52
Show Gist options
  • Select an option

  • Save xenago/c684e74e4eed652d586fdff3e0dde731 to your computer and use it in GitHub Desktop.

Select an option

Save xenago/c684e74e4eed652d586fdff3e0dde731 to your computer and use it in GitHub Desktop.
Retrieve list of Bitbucket repos, including which have wiki/issues enabled

Atlassian is sunsetting the Wiki and Issues features of Bitbucket on very short notice, without providing a ui for users to see which repositories of theirs are affected.

This PowerShell snippet will iterate through accessible repositories in the provided namespace, and produce a file in the running user's home directory called repos.csv with information about the repositories, including their URL and if they're using the deprecated Wiki or Issues features.

Replace ORGNAMEHERE in the $url variable with your namespace, and email@domain.com:apikey in the $creds variable with your credentials.

& {
  $creds = "email@domain.com:apikey"
  $url = "https://api.bitbucket.org/2.0/repositories/ORGNAMEHERE?pagelen=100"
  $all = @()
  do {
    $r = curl.exe -s -X GET --user $creds $url | ConvertFrom-Json
    $all += $r.values | Select-Object name, slug, language, updated_on, has_wiki, has_issues,
      @{N="project"; E={$_.project.name}},
      @{N="url"; E={$_.links.html.href}}
    $url = $r.next
  } while ($url)
  $all | Export-Csv -Path "$HOME\repos.csv" -NoTypeInformation
}

Example output:

"name","slug","language","updated_on","has_wiki","has_issues","project","url"
"Platform","platform","c#","2017-12-27T22:56:12.686651+00:00","False","True","DevOps Project","https://bitbucket.org/ORGNAMEHERE/platform"
"The_customer","the_customer","html/css","2025-06-30T00:13:06.075336+00:00","True","False","Untitled project","https://bitbucket.org/ORGNAMEHERE/the_customer"
"Scripts","scripts","","2026-03-25T18:39:01.728470+00:00","False","False","DevOps Project","https://bitbucket.org/ORGNAMEHERE/scripts"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment