项目作者: tclindner

项目描述 :
Configurable application for interacting with Bitbucket Server
高级语言: JavaScript
项目地址: git://github.com/tclindner/bitbucket-server-cli.git
创建时间: 2017-08-09T01:26:45Z
项目社区:https://github.com/tclindner/bitbucket-server-cli

开源协议:MIT License

下载


bitbucket-server-cli

CLI for interacting with Bitbucket Server

license
npm
ci
Dependency Status
devDependency Status

What is bitbucket-server-cli?

bitbucket-server-cli helps you quickly scan your Bitbucket repositories.
Currently it can:

  • Audit permissions to ensure all of your repositories are configured similarly
  • Finds stale pull requests
  • Compiles statistics about pull requests

How do I install?

First thing first, let’s make sure you have the necessary pre-requisites.

System Dependencies

Node

Install

  • npm install bitbucket-server-cli -g

Set environment variables

Set the following environment variables:

  • BITBUCKET_BASE_URL, ex: https://bitbucketserver.myserver.com
  • BITBUCKET_USERNAME, ex: username
  • BITBUCKET_PASSWORD, ex: password

Commands and configuration

NOTE: You will need ADMIN permissions to each project/repo you are auditing.

Global Options

Option Alias Description
bitbucket-server-cli —help bitbucket-server-cli -h Lists supported CLI options
bitbucket-server-cli —version bitbucket-server-cli -v Lists the current version number
bitbucket-server-cli —projects bitbucket-server-cli -p Comma separated list of Bitbucket project keys

Commands

bitbucket-server-cli audit-permissions

Audits permissions

Alias: ap

Permissions README

Examples
bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -c "./permissionsConfig.json" audit-permissions

bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -c "./permissionsConfig.json" ap

Please see the Permissions README for additional examples.

bitbucket-server-cli stale-prs

Fetches a list of stale pull requests

Alias: sp

Stale PRs README

Examples
bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -s "30 days" stale-prs

bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -s "30 days" sp

Please see the Stale PRs README for additional examples.

bitbucket-server-cli pr-stats

Fetch PRs stats

Alias: s

Pull Request Stats README

Examples
bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -r "30 days" pr-stats

bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -r "30 days" s

Please see the Pull Request Stats README for additional examples.

Contributing

Please see CONTRIBUTING.md.

Release History

Please see CHANGELOG.md.

License

Copyright (c) 2017-2020 Thomas Lindner. Licensed under the MIT license.