Overview
| module url | N/A | ||||||||||
| git repository | https://bitbucket.org/arrizza-public/check-bb | ||||||||||
| git command | git clone git@bitbucket.org:arrizza-public/check-bb.git | ||||||||||
| verification report | https://arrizza.com/web-ver/python-check-bb-report.html | ||||||||||
| version info |
|
- repo status: Repo Information
- installation: Common Setup
Summary
This project shows how to ccheck BitBucket repos for various attributes.
Setup
This project uses pip module atlassian-python-api which requires a BitBucket API userid and password.
See App Passwords to set one up.
Then create a ~/.bitbucket file with your userid and app_password:
cat ~/.bitbucket
# similar to:
[auth]
username=<your_userid>
app_password=<your_password>
In lib/workspaces.json set up the workspace names that belong to public vs private ones.
In my case, I only have two:
{
"arrizza-public": "public",
"arrizza-private": "private"
}
In lib/repos.py there is a dict that contains information about where the repos
reside on your local PC. I have a public and a private set of repos set up
in different workspaces and so they have different expected attributes.
'~/bin/proj-man': { <== the local directory
'bb-repo': 'proj-man', # <== the BB name
'giturl': 'private', # <== in the private workspace
},
'~/projects/web/xplat-utils-ut': {
'bb-repo': 'xplat-utils-ut',
'giturl': 'public', # <== in the public workspace
},
In lib/cfg.py:
- change the remote_url attribute to your website's prefix.
- change your default git branch
Run it
./doit <== defaults to only the public workspaces
./doit private <== checks the private ones
./doit all <== checks them both
Typical output:
# project key repo name public/private
ai AI ai-hmm-sentence-gen public
ai AI ai-linear-regression public
... snip...
# a typical error looks like:
arduino AR arduino-sim-spi private
WARN: repo is private, website: https://arrizza.com/arduino.html
... snip...
# shows total counts.
---> repo status
total repos : 92
issues is set up: 83
websites ok : 83
warns/errs found: 9
- Possible warnings/errors:
- In public workspaces:
- the repo is marked private
- the website does not start with the correct
https://your_url - the website needs to end with ".html" (for SEO purposes)
- the Issues Tracker is not enabled in the repo settings
- the git branch is not default_branch.
- In Private workspaces:
- the repo is not marked private
- the website should be empty
- the Issues Tracker is enabled in the repo settings
- the git branch is not default_branch.
- In public workspaces: