Commit Counter generates simple webpage for tracking your progress in 365 Commits Challenge. It can be easily deployed as Google Cloud Function.
- Python 3.8 or newer
- poetry
- Google Cloud SDK
- Create
.env.yaml
config file from the provided template template:cp .env.yaml.template .env.yaml
- Generate GitHub access token:
Go to your GitHub's Settings > Developer Settings > Personal access tokens or click here.
Generate new token withrepo
anduser
permissions. - Put generated token into
GITHUB_ACCESS_TOKEN
variable in.env.yaml
file. - Adjust start, end and commit count settings in
.env.yaml
file.
Note: Make sure that all values are strings. - Make sure your
gcloud
configuration is correct:# Check your active project: gcloud config list # Make sure you have set correct region for function deployment: # Note: compute/region doesn't affect functions. gcloud config set functions/region <region-close-to-you>
- Deploy solution by executing
deploy.sh
script:./deploy.sh
- Visit function endpoint with webbrowser and start coding!
- Display challenge info
- Start/end date
- Commits left
- Days to go
- Current progress
- Nice progress bar
- Group commits shown by date and repository
- Serve placeholder site when visiting root page and update commit data interactively.
- Add setting for holding repo blacklist - repositories that should not count in the challenge.
- Rename
START_DATE
/END_DATE
toCHALLENGE_START
/CHALLENGE_END
. - Make use of
DEBUG
setting. - Generate
.env.yaml
bymain.py --generate-settings
(or similar) invocation - get rid of template.