Sync all Bitbucket project repositories to a list

Recipe ToolsDeveloper ToolAPI Integration

What it does

When someone calls this function, this automation retrieves all repositories from a Bitbucket project and builds a complete list. It pages through results up to 300 at a time so nothing is missed.

Who it's for

Engineering teams who need to catalog all repositories in a Bitbucket project for reporting or integration.

How teams use this

Build a repository inventory report

Call this function to gather all project repositories into one list, then export that list to a spreadsheet or dashboard for team visibility and compliance tracking.

Sync repositories to a separate system

Use the returned list to push repository metadata into a separate catalog or asset management system and set field mappings so other teams stay in sync with Bitbucket.

Validate repository access across teams

Call this function from a security workflow to check all repositories in a project and verify that access rules match organizational policy.

How it works

  1. Call the function to start. Invoke this function from another workflow or application to retrieve all repositories for a specified Bitbucket project.
  2. Get repositories from Bitbucket. Query Bitbucket for the first page of repositories in the project, then loop through each page up to 300 results per request.
  3. Fetch via HTTP when needed. Make direct HTTP calls to Bitbucket via Rest if the standard Bitbucket query does not cover the request, then add each repository to the growing list.
  4. Return the complete list. Pass the full repositories list back to the calling workflow so it can use the data for downstream tasks.