English | Español | 中文 | Français | Deutsch | Português | 日本語 | Русский
Creates an HTML-report with analysis of commit statistics:
- the work pace and number of overtime hours;
- zones of responsibility, number of features and bugs;
- colleagues working style;
- the rate of employee turnover and the makeup of the team;
- location of developers;
- release schedule and vacation calendar;
- cost of features and project as a whole;
- places for refactoring, deleted files, etc.
Links: demo, online version, docker, reddit, habr.
Video: english, español, русский.
- go to the website
- follow the instructions
- run
npx assayo
- open
./assayo/index.html
- run
composer require bakhirev/assayo
- run
vendor/bin/assayo
- open
./assayo/index.html
- run
pipx install assayo
- run
assayo
- open
./assayo/index.html
- run
gem install assayo
- run
assayo
- open
./assayo/index.html
- run
go get github.com/bakhirev/assayo
- run
go install github.com/bakhirev/assayo
- run
assayo
- open
./assayo/index.html
-
download this repository
git clone https://github.com/bakhirev/assayo.git
; -
drop the
log.txt
file to the/build
folder; -
run
/build/index.html
; -
or drop the
/build
folder to your repository (where thelog.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.
Add script in folder .github/workflows/
or use this action from the marketplace.
- download the docker image;
- run it on your local network;
- use the web interface to view the reports, set the URL of the data in the URL parameter
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.
In the root directory of your project, you need to create a .mailmap
file.
Example of the contents of the file:
Alex B <[email protected]>
Alex B <[email protected]> <[email protected]>
Alex B <[email protected]> <[email protected]>
Alex B <[email protected]> <[email protected]>
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 --oneline --all --reverse --date=iso-strict --pretty=format:"%ad>%aN>%aE>%s" | sed -e 's/\\/\\\\/g' | sed -e 's/`/"/g' | sed -e 's/\$/S/g' | sed -e '1s/^/R(f\`/' | sed -e '$s/$/\`\);/' > 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
By default, the output encoding may not match UTF-8 and the resulting log file will be unreadable. Before saving the log, you can change the encoding with the command.
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
Or open a saved file and manually change the encoding to UTF-8.
- generate for each microservice file
log.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; - see “How to view an online report?”. At the last step, drag all the files at once into the browser window.
- see “How to see a report offline?”. At the second step, drag all microservice files (
log-1.txt
,log-2.txt
,log-3.txt
and etc.) to the report folder (/build
).
Follow the Conventional Commits 1.0.0. Example:
JIRA-1234 feat(profile): Added avatar for user
- task number in the task tracker
(JIRA-1234)
- type of work
(feat, fix, style, refactor, test, doc and etc.)
- feature
(profile - new page on site or new function, use one (two) short word or an abbreviation)
- what problem were solved
(Added avatar for user)
- Create file
commit-msg
in folder.git/hooks/
- Add this text in file:
#!/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
Use package pre-commit
- Add in file
package.json
propertycommit-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"
},
...
You can create your own interface theme. Options:
- Title. You can set default document title in the URL parameter
title
. Example:?title=You Company
- Visual theme. To do this, you need to prepare a CSS file with new styles and specify its URL in the
theme
parameter. Example:?theme=//company.com/some.css
. You can use class names as selectors. Most of them do not change in new versions. - Language. You can set language in the URL parameter
lang
. Example:?lang=es
Example: demo
- download this repository
git clone https://github.com/bakhirev/assayo.git
- run
npm install
- run
npm run build:local
- the new HTML build will be in the
/build
folder
You can add a new translation or correct an existing one in the ts/translations/
folder.
Instruction
src
|- pages
|- Person // all personal dashboards
|- Team // all dashboards about team
|
|- helpers
|- Parser // parse text from git log to JS objects
|- DataGrip // data grouping and counting values
|- achievement // the logic that gives out personal achievements
|- Recommendations // the logic that gives out common recommendations
|
|- translations // translations into other languages
- Reports showcase UI displays a list of available reports. Each report consists of a title, description, and a list of repositories.
- Crawler service collects repository logs for the report.
- Log visualization UI (you here) displays report. Needs a log file for work.
- 📱 https://t.me/bakhirev (priority method of communication)
- 📧 [email protected]
- 🌐 https://bakhirev.github.io/