You are looking at the user documentation for the most recent master
branch of RepoSense (not released to the public yet). The documentation for the latest public release is here.
report-config.yaml
RepoSense allows you to easily showcase your coding portfolio by generating visualization reports of your contributions across different repositories.
This guide will help you set up your first RepoSense report using the report-config.yaml
file.
report-config.yaml
?The report-config.yaml
file is a simple configuration file that lets you define which repositories you want to include in your RepoSense report in more detail compared to the CLI flags.
It's designed to be user-friendly, especially for beginners who want to quickly set up a code portfolio without dealing with complex configurations.
For more sophisticated use cases that require additional flexibility, RepoSense's CSV configuration files offer an alternative configuration approach with expanded capabilities.
report-config.yaml
fileCreate a new file named report-config.yaml
in your project directory with the following basic structure:
title: "Your Portfolio Title"
repos:
- repo: "https://github.com/repo/yourrepo.git"
branches:
- branch: main
blurb: "Short description of this project"
authors:
- author-git-host-id: Your username on GitHub, GitLab or Bitbucket
author-display-name: Your display name
author-git-author-name: Author Name Of Your Git Configuration
author-emails:
- emails-of-your-commits@email.com
- emails-of-your-git-configuration@email.com
The author-display-name
, author-git-author-name
and author-emails
fields are optional.
However, users are encouraged to add their Git author name author-git-author-name
and emails author-emails
in their Git configuration related to their commits so that
the commits can be successfully captured.
You can add multiple repositories to showcase different projects. Here's an example:
title: "John Doe's Code Portfolio"
repos:
- repo: https://github.com/john/ip.git
branches:
- branch: master
blurb: "Individual Project - Task Manager Application"
authors:
- author-git-host-id: johnDoe
author-display-name: John Doe
- repo: https://github.com/john/tp.git
branches:
- branch: master
blurb: "Team Project - Event Management System"
authors:
- author-git-host-id: johnDoe
author-display-name: John Doe
To run RepoSense with report-config.yaml
:
config
folder in the same directory as the RepoSense.jar file.report-config.yaml
to the config
folder.java -jar RepoSense.jar
Please note that the above command will only analyse your commits one month before the current date. If you would like to
specify the period for report generation, you can use the --since
and --until
flags.
java -jar RepoSense.jar --since START_DATE --until END_DATE
Additionally, you can add a --portfolio
flag to generate a more optimized view of your report.
That's it! RepoSense will analyze the repositories you specified and generate a report that visualizes your contributions.
Here's a sample report-config.yaml
file for a student showcasing their work across several projects:
title: My Code Portfolio
repos:
- repo: https://github.com/RepoSense/reposense.git
groups:
- group-name: code
globs:
- "**.java"
branches:
- branch: master
blurb: "Reposense is a code contribution analysis tool which I contributed."
authors:
- author-git-host-id: lyuanww
author-display-name: Li Yuan
author-emails:
- user@gmail.com
- e0123456@u.nus.edu
- repo: https://github.com/lyuanww/ip.git
groups:
- group-name: code
globs:
- "**.java"
branches:
- branch: master
blurb: "A task manager chat bot implemented in Java."
authors:
- author-git-host-id: lyuanww
author-display-name: Li Yuan
author-emails:
- user@gmail.com
- e0123456@u.nus.edu
- repo: https://github.com/lyuanww/tp.git
groups:
- group-name: code
globs:
- "**.java"
branches:
- branch: master
blurb: "A patient management system implemented in Java."
authors:
- author-git-host-id: lyuanww
author-display-name: Li Yuan
author-emails:
- user@gmail.com
- e0123456@u.nus.edu
Optionally, you can provide more detailed descriptions to your report such as an introduction at the top of your dashboard or explanatory blurbs for each repository. Please refer to this section.
For users who need more advanced configuration options, report-config.yaml
offers many additional features beyond the basic setup. The following section explains the complete syntax and capabilities.
report-config.yaml
Exampletitle: RepoSense Report
repos:
- repo: https://github.com/reposense/publish-RepoSense.git
groups:
- group-name: code
globs:
- "**.py"
- group-name: tests
globs:
- "src/test**"
- group-name: docs
globs:
- "docs**"
- "**.adoc"
- "**.md"
branches:
- branch: master
blurb: "My project"
authors:
- author-git-host-id: jedkohjk
author-display-name: jedkohjk
author-git-author-name: jedkohjk
author-emails:
- email1@example.com
- email2@example.com
ignore-authors-list:
- bot
ignore-glob-list:
- "**.in"
file-size-limit: 2000000
Note: All fields are optional unless specified otherwise.
title
: Sets the title of your generated report, which appears as the title of the deployed dashboard.
repos
: A list of repositories to include in your analysis..
For each repository in the repos
list, you can specify:
repo
mandatory : The URL to the repository you want to analyze.
https://github.com/RepoSense/reposense.git
groups
: Allows you to define custom groupings of files for more organized analysis.
group-name
mandatory : A name for the group (e.g., "code", "tests", "docs").globs
mandatory : File patterns to include in this group using glob format.branches
mandatory : The branches you want to analyze in the repository.
branch
: The name of the branch (e.g., "master", "main", "develop").
blurb
: A short description of the branch that appears in the report.
blurbs.md
file.Within each branch, you can specify:
authors
: A list of authors whose contributions you want to track. If none specified, all authors will be shown.
author-git-host-id
mandatory : The GitHub username of the author.author-display-name
: The name to display in the report (can be different from the GitHub username).author-git-author-name
: The name used in Git commits.author-emails
: A list of email addresses associated with the author's commits.ignore-authors-list
: Authors to exclude from the analysis.
ignore-glob-list
: Files or directories to exclude from analysis.
"**.in"
excludes all files with the ".in" extension.file-size-limit
: Maximum file size (in bytes) for analysis.