bakhirev / assayo

📈 Visualization and analysis of your git repository data.
https://assayo.online/
Other
148 stars 11 forks source link
achivments audit commit data-visualization git report statistics

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!

Assayo

Visualization and analysis of your git repository data (demo, install).

👨‍💻 Employee can evaluate new workplace
‍👨‍💼 Team lead can evaluate employees
👑 Founder can evaluate product

Table of contents

🚀 How to quickly view the number of commits?

In the root directory of your project, run:

git shortlog -s -n -e

‍🎭 How to concat authors?

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.

📤 How to export data from git?

For online viewing

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

For offline viewing

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

📈 How to view the report?

Online

Offline

🏭 How to rebuild the report build?

🗃️ How to view a report on a group of microservices?

🎨 How to brand the interface?

You can create your own interface theme. Options:

📝 How to sign commits?

Follow the Conventional Commits 1.0.0. Example:

JIRA-1234 feat(profile): Added avatar for user 

👮 How to add checking for commit message?

Use file commit-msg

  1. Create file commit-msg in folder .git/hooks/
  2. 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

  3. Add in file 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"
    },
    ...
  4. Run command npm install pre-commit

📚 How to automate data collection?

With backend

Without backend

🛠️ DevOps (CI/CD)

Public server

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

Private server

How to update the Docker image?

️ 🛠️ About application

📐 Architecture

  1. Reports showcase UI displays a list of available reports. Each report consists of a title, description, and a list of repositories.
  2. Crawler service collects repository logs for the report.
  3. Log visualization UI (you here) displays report. Needs a log file for work.

🈯 How to add or edit a translation?

You can add a new translation or correct an existing one in the ts/translations/ folder. Instruction

🗺️ RoadMap:

Releases are planned approximately once every six months. What’s next:

📬 Feedback, suggestions, comments