Snippets

Tim Pettersen Download commit as ZIP Bitbucket add-on

Created by Tim Pettersen last modified

This Bitbucket add-on adds a Download as ZIP link to each commit in your repository.

screenshot of link

To install the add-on, click the URL below and follow the prompts:

https://bitbucket.org/site/addons/authorize?descriptor_uri=https://bitbucket.org/!api/2.0/snippets/tpettersen/78Ajj/master/files/connect.json&redirect_uri=https://bitbucket.org/snippets/tpettersen/78Ajj

You will be redirected back to this page after installation.

Then browse to any commit on any Bitbucket repository and click the Download as ZIP link! (You should see a link on this commit, for example: https://bitbucket.org/tpettersen/run-bucket-run/commits/HEAD)

Note that this is a "personal" add-on, so the link will only be visible to the user (or team) that installed the add-on.

{
    "key": "download-commit-as-zip",
    "name": "Download commit as ZIP",
    "description": "Adds a \"Download as ZIP\" link to the commits page on Bitbucket",
    "baseUrl": "https://bitbucket.org",
    "modules": {
        "webItems": [{
            "key": "download-link",
            "url": "https://bitbucket.org/{repo_path}/get/{commit_hash}.zip",
            "name": {
                "value": "Download as ZIP"
            },
            "location": "org.bitbucket.commit.summary.actions",
            "params": {
                "auiIcon": "aui-iconfont-down"
            }
        }],
        "oauthConsumer": {
            "clientId": "WaLh6mhKdRUDpVcXAH"
        }
    },
    "scopes": ["team"],
    "contexts": ["personal"]
}

Comments (3)