Skip to main content

#bitbucket-helper A command-line utility for working with lots of bitbucket server projects and repositories.

The helper allows you to clone or pull every bitbucket repository you have access too. Repositories are pathed under their parent project, making it easy to identify the source project.

Installation

The utility requires python3.7

pip install -u bitbucket-helper

Setup

The first time you attempt to clone, you will get prompted to provide your bitbucket server hostname, username, a personal access token and a working directory where projects will get cloned.

To generate a read-only personal access token. Go to Bitbucket -> Manage account -> Personal Access Tokens.

bitbucket-helper sync

[Bitbucket server hostname]: myserver.domain    
[Bitbucket username]: myusername
[Personal access token]: secret
[Working directory (defaults to ~/bitbucket/)]: 
[Clone using http or ssh]: http

All configuration settings get stored in ~/.bitbucket-helper.config.

Synchronising

The synchronisation function uses bitbucket APIs to get all accessible projects and repositories. For each project, it will create a directory using its key. For each repository, we perform a git clone or a git pull if we already have a local copy. After the pull, we prune and delete local branches that have been merged at the origin.

Local directory structure:

  • working_directory (~/bitbucket)
    • proj1
      • repo1
      • repo2
    • proj2
      • repo1
      • repo2
bitbucket-helper sync

Git log commands

Bitbucket helper makes it easy to search for commits across all of your repositories using simple filters. Log commands operate on locally synched repositories, so remember to do a bitbucket-helper sync first.

You can find all commits after a specified date using:

bitbucket-helper log --after=2020-03-02

To search from commits between two tags:

bitbucket-helper log --from_tag=1.9.0 --to_tag=1.9.1

The command outputs the following quoted comma-separated values:

"repo","commit_hash","unix_time","iso_date","commit_message","author"

Release files for bitbucket-helper 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bitbucket-helper 0.0.2
File Size Uploaded
bitbucket-helper-0.0.2.tar.gz 4.3 kB Details

Release files / bitbucket-helper-0.0.2.tar.gz

Download URL bitbucket-helper-0.0.2.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f1014deff565e2a631ce7c9e58e5f09c176991a7925a2906e9fc35828432d9e2
BLAKE2b-256 checksum
How to use checksums
bcea5210d9fd5da6ba91274cfac9a4317b7ac997b867fe4bda21fab2b5e414e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

Release history Release notifications | RSS feed

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

1 release file

0.0.3

1 release file

This release

0.0.2 This release

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page