English | 中文 | Español | Français | Português | Deutsch | 日本語 | Русский
The main documentation is in russian. This is a translation. It may contain errors. If you a native speaker, you can help improve this translation. Thanks!
Visualization and analysis of your git repository data (demo, install).
In the root directory of your project, run:
git shortlog -s -n -e
In the root directory of your project, you need to create a .mailmap
file.
Example of the contents of the file:
Alex B <alex@mail.uk>
Alex B <alex@mail.uk> <alex@gov.tk>
Alex B <alex@mail.uk> <bakhirev@ya.kz>
Alex B <alex@mail.uk> <man64@yahoo.com>
Read more about the format of this file you can here.
In the root directory of your project run:
git --no-pager log --raw --numstat --oneline --all --reverse --date=iso-strict --pretty=format:"%ad>%aN>%aE>%s" > log.txt
git --no-pager log --raw --numstat --raw --oneline --all --reverse --date=iso-strict --pretty=format:"%ad>%aN>%aE>%s" | sed -e 's/\\/\\\\/g' | sed -e 's/`/"/g' | sed -e 's/^/report.push(\`/g' | sed 's/$/\`\);/g' | sed 's/\$/_/g' > log.txt
Git will create a file log.txt
.
This file contains data for show a report.
The difference between the online and offline format is the presence of a wrapper for strings. The offline format will be pulled up like a js
file if you just opened /build/index.html
log.txt
file to the /build
folder;/build/index.html
;/build
folder to your repository (where the log.txt
is located). You can change the name. For example, from /build
to /report
.
In this case, it is important that the log.txt
file is generated by the command for offline viewing.npm install
npm run build-local
/build
folderlog.txt
(log-1.txt
, log-2.txt
, log-3.txt
and etc.) You can do this manually, or use the Assayo Crawler module for automatic log collection;log-1.txt
, log-2.txt
, log-3.txt
and etc.) to the report folder (/build
).You can create your own interface theme. Options:
title
. Example: ?title=You Company
theme
parameter. Example: ?theme=//company.com/some.css
. You can use class names as selectors. Most of them do not change in new versions.lang
. Example: ?lang=es
Follow the Conventional Commits 1.0.0. Example:
JIRA-1234 feat(profile): Added avatar for user
(JIRA-1234)
(feat, fix, style, refactor, test, doc и т.д.)
(profile - new page on site or new function, use one (two) short wordor an abbreviation)
(Added avatar for user)
commit-msg
commit-msg
in folder .git/hooks/
#!/usr/bin/env bash
if ! grep -iqE "(JIRA-[0-9]{1,5})(\s)(feat|fix|docs|style|refactor|test|chore)((\([a-z0-9_-]{1,}\)){0,})(:\s)([a-z]{1,})" "$1"; then
echo "Need commit message like: JIRA-12 fix(profile): some text. Read Semantic Commit Messages" >&2
exit 1
fi
package.json
property commit-msg
:
...
"commit-msg": {
"regex": "(JIRA-[0-9]{1,5})(\\s)(feat|fix|docs|style|refactor|test|chore)((\\([a-z0-9_-]{1,}\\)){0,})(:\\s)([a-z]{1,})",
"error-message": "Need commit message like: JIRA-12 fix(profile): some text Read Semantic Commit Messages"
},
...
npm install pre-commit
build
folder to the root;build/index.html
in the browser and add it to bookmarks;build/assets/ci-cd.sh
to the startup folder (Windows);
Every time you restart the computer, the script will update statistics on all the data that automatically merged into the main branch.You can upload the data file for report construction to a public URL. And use the website’s assayo to visualize it.
https://assayo.online/demo/?dump=//you_site.com/some/log.txt
dump
:
http://assayo_url/?dump=//you_url/some/log.txt
assayo_url - URL of the assayo container, it listens on port 80;
you_url - URL of your container with git logs;
By default, the image will run at http://127.0.0.1:80/
. If it doesn't work, check if port 80 is free.
npm run build-local
docker build -t assayo .
docker run --name assayo -p 80:80 -d assayo
;docker tag assayo bakhirev/assayo:latest
;docker push bakhirev/assayo:latest
;You can add a new translation or correct an existing one in the ts/translations/
folder.
Instruction
Releases are planned approximately once every six months. What’s next: