上传报告到BitBucket服务器,用于使用代码洞察功能
项目描述
bitbucket-code-insight-reports
上传报告到BitBucket服务器,用于使用代码洞察功能。
设计为可扩展,因此可以连接到任何输出文件路径、行号和错误的任何东西。
特性
- 从
terraform fmt --diff -check -recursive
的输出中报告失败的行 - 从
git diff
的输出中报告失败的行(必须提供输入文件)
使用方法
usage: bitbucket-code-insight-reports [-h] [--file FILE] -u USER [-p PASSWORD]
--report_key REPORT_KEY --report_title
REPORT_TITLE --report_desc REPORT_DESC
--report_type
{terraform,git-diff,custom} --base_url
BASE_URL --project_key PROJECT_KEY
--repo_slug REPO_SLUG --commit COMMIT
[--status {PASS,FAIL}]
[--annotations ANNOTATIONS]
Uploads information to code insights in BitBucket.
optional arguments:
-h, --help show this help message and exit
--file FILE Input file for report (not required for all report
types.
Authentication Options:
-u USER, --user USER User to authenticate with BitBucket
-p PASSWORD, --password PASSWORD
Password to authenticated with BitBucket
Report Options:
Options to configure the report
--report_key REPORT_KEY
BitBucket key for report.
--report_title REPORT_TITLE
Human readable title for report.
--report_desc REPORT_DESC
Description for the report.
--report_type {terraform,git-diff,custom}
Report type
BitBucket Configuration:
Info to access the repository and PR
--base_url BASE_URL URL of the BitBucket server.
--project_key PROJECT_KEY
BitBucket key for the project.
--repo_slug REPO_SLUG
Name of repo in BitBucket.
--commit COMMIT Commit hash for the commit to upload the report to.
Custom Report Options:
Arguments only for use with the custom report type.
--status {PASS,FAIL} Status of the report, PASS/FAIL.
--annotations ANNOTATIONS
Annotations in a JSON string as shown in
https://docs.atlassian.com/bitbucket-
server/rest/5.16.0/bitbucket-code-insights-
rest.html#idm361726402736
致谢
此包是用Cookiecutter和tomtom-international/cookiecutter-python项目模板创建的。
变更日志
0.0.1-dev (2019-06-20)
- 首次发布到PyPI。