Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/reposense/RepoSense into …
Browse files Browse the repository at this point in the history
…implement-one-stop-config-file
  • Loading branch information
georgetayqy committed Jun 9, 2024
2 parents 18772f0 + 7d7a5a9 commit 4b409f9
Show file tree
Hide file tree
Showing 67 changed files with 12,120 additions and 4,125 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ node_modules
/frontend/public/
!/frontend/public/favicon.ico
!/frontend/public/index.html
/frontend/.eslintcache
/frontend/.stylelintcache

reposense-report/
docs/_site/
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ dependencies {
implementation group: 'org.apache.ant', name: 'ant', version: '1.10.12'
implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.9.0'
implementation group: 'org.fusesource.jansi', name: 'jansi', version: '2.4.0'
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.17.0'
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.17.0'

testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: jUnitVersion
Expand Down
2 changes: 2 additions & 0 deletions config/blurbs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://github.com/reposense/testrepo-Alpha/tree/master
Master branch of testrepo-Alpha
2 changes: 1 addition & 1 deletion docs/_markbind/layouts/body.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div id="content-wrapper" class="fixed-header-padding">
{{ content }}
</div>
{% if pagnav %}
{% if pagenav %}
<nav id="page-nav" class="fixed-header-padding">
<div class="nav-component slim-scroll">
<page-nav />
Expand Down
3 changes: 0 additions & 3 deletions docs/_markbind/variables.json

This file was deleted.

82 changes: 40 additions & 42 deletions docs/_markbind/variables.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
<span id="icon_announcement"><md>:fas-bell:</md></span>
<span id="icon_book"><md>:fas-book:</md></span>
<span id="icon_calendar"><md>:fas-calendar-alt:</md></span>
<span id="icon_dislike"><md>:fas-thumbs-down:</md></span>
<span id="icon_example"><md>:fas-cube:</md></span>
<span id="icon_embedding"><md>:glyphicon-log-in:</md></span>
<span id="icon_exercise"><md>:fas-dumbbell:</md></span>
<span id="icon_extra"><span class='badge rounded-pill bg-secondary'><md>:fas-plus: extra</md></span></span>
<span id="icon_info"><md>:fas-info-circle:</md></span>
<span id="icon_like"><md>:fas-thumbs-up:</md></span>
<span id="icon_linux"><md>:fab-linux:</md></span>
<span id="icon_level_basic"><md><span class="badge rounded-pill bg-danger">:far-star:</span></md></span>
<span id="icon_level_intermediate"><md><span class="badge rounded-pill bg-warning text-white">:far-star::far-star:</span></md></span>
<span id="icon_level_advanced"><md><span class="badge rounded-pill bg-success">:far-star::far-star::far-star:</span></md></span>
<span id="icon_important_big_red"><font color="red"><big>:glyphicon-exclamation-sign:</big></font></span>
<span id="icon_important"><md>:glyphicon-exclamation-sign:</md></span>
<span id="icon_new_window"><md>:glyphicon-new-window:</md></span>
<span id="icon_outcome"><md>:fas-trophy:</md></span>
<span id="icon_output"><md>:fas-arrow-down:</md></span>
<span id="icon_output_right"><md>:fas-arrow-right:</md></span>
<span id="icon_print"><md>:glyphicon-print:</md></span>
<span id="icon_prereq"><md>:glyphicon-education:</md></span>
<span id="icon_preview"><md>:glyphicon-eye-open:</md></span>
<span id="icon_pro_tip"><span class="badge rounded-pill bg-warning">:fas-lightbulb: PRO TIP</span></span>
<span id="icon_Q"><md>:glyphicon-question-sign:</md></span>
<span id="icon_Q_A">{{ icon_Q | safe }}:glyphicon-ok-sign:</span>
<span id="icon_resource"><md>:fas-paperclip:</md></span>
<span id="icon_terminal"><smal><span class="badge bg-secondary">&gt;_</span></smal></span>
<span id="icon_text"><md>:far-file-alt:</md></span>
<span id="icon_tick"><md>:fas-check:</md></span>
<span id="icon_tip"><span class="badge rounded-pill bg-warning">:fas-lightbulb:</span></span>
<span id="icon_tick_green"><span style="color:green">{{ icon_tick | safe }}</span></span>
<span id="icon_todo"><md>:glyphicon-check:</md></span>
<span id="icon_slides"><md>:far-images:</md></span>
<span id="icon_video"><md>:glyphicon-facetime-video:</md></span>
<span id="icon_windows"><md>:fab-windows:</md></span>
<span id="icon_x"><md>:fas-times:</md></span>
<span id="icon_x_red"><span style="color:red">{{ icon_x | safe }}</span></span>
<span id="bad"><font color="red"><md>**{{ icon_dislike | safe }} Bad**</md></font></span>
<span id="good"><font color="green"><md>**{{ icon_like | safe }} Good**</md></font></span>

<variable from="variables.json" />
<variable name="icon_announcement"><md>:fas-bell:</md></variable>
<variable name="icon_book"><md>:fas-book:</md></variable>
<variable name="icon_calendar"><md>:fas-calendar-alt:</md></variable>
<variable name="icon_dislike"><md>:fas-thumbs-down:</md></variable>
<variable name="icon_example"><md>:fas-cube:</md></variable>
<variable name="icon_embedding"><md>:glyphicon-log-in:</md></variable>
<variable name="icon_exercise"><md>:fas-dumbbell:</md></variable>
<variable name="icon_extra"><span class='badge rounded-pill bg-secondary'><md>:fas-plus: extra</md></span></variable>
<variable name="icon_info"><md>:fas-info-circle:</md></variable>
<variable name="icon_like"><md>:fas-thumbs-up:</md></variable>
<variable name="icon_linux"><md>:fab-linux:</md></variable>
<variable name="icon_level_basic"><md><span class="badge rounded-pill bg-danger">:far-star:</span></md></variable>
<variable name="icon_level_intermediate"><md><span class="badge rounded-pill bg-wg text-white">:far-star::far-star:</span></md></variable>
<variable name="icon_level_advanced"><md><span class="badge rounded-pill bg-success">:far-star::far-star::far-star:</span></md></variable>
<variable name="icon_important_big_red"><font color="red"><big>:glyphicon-exclamation-sign:</big></font></variable>
<variable name="icon_important"><md>:glyphicon-exclamation-sign:</md></variable>
<variable name="icon_new_window"><md>:glyphicon-new-window:</md></variable>
<variable name="icon_outcome"><md>:fas-trophy:</md></variable>
<variable name="icon_output"><md>:fas-arrow-down:</md></variable>
<variable name="icon_output_right"><md>:fas-arrow-right:</md></variable>
<variable name="icon_print"><md>:glyphicon-print:</md></variable>
<variable name="icon_prereq"><md>:glyphicon-education:</md></variable>
<variable name="icon_preview"><md>:glyphicon-eye-open:</md></variable>
<variable name="icon_pro_tip"><span class="badge rounded-pill bg-warning">:fas-lightbulb: PRO TIP</span></variable>
<variable name="icon_Q"><md>:glyphicon-question-sign:</md></variable>
<variable name="icon_Q_A">{{ icon_Q | safe }}:glyphicon-ok-sign:</variable>
<variable name="icon_resource"><md>:fas-paperclip:</md></variable>
<variable name="icon_terminal"><smal><span class="badge bg-secondary">&gt;_</span></smal></variable>
<variable name="icon_text"><md>:far-file-alt:</md></variable>
<variable name="icon_tick"><md>:fas-check:</md></variable>
<variable name="icon_tip"><span class="badge rounded-pill bg-warning">:fas-lightbulb:</span></variable>
<variable name="icon_tick_green"><span style="color:green">{{ icon_tick | safe }}</span></variable>
<variable name="icon_todo"><md>:glyphicon-check:</md></variable>
<variable name="icon_slides"><md>:far-images:</md></variable>
<variable name="icon_video"><md>:glyphicon-facetime-video:</md></variable>
<variable name="icon_windows"><md>:fab-windows:</md></variable>
<variable name="icon_x"><md>:fas-times:</md></variable>
<variable name="icon_x_red"><span style="color:red">{{ icon_x | safe }}</span></variable>
<variable name="bad"><font color="red"><md>**{{ icon_dislike | safe }} Bad**</md></font></variable>
<variable name="good"><font color="green"><md>**{{ icon_like | safe }} Good**</md></font></variable>
2 changes: 1 addition & 1 deletion docs/dg/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* [`GitShortlog`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitShortlog.java): Wrapper class for `git shortlog` functionality. Obtains the list of authors who have contributed to the target repo.
* [`GitShow`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitShow.java): Wrapper class for `git show` functionality. Gets the date of the commit with the commit hash.
* [`GitUtil`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitUtil.java): Contains helper functions used by the other Git classes above.
* [`GitVersion`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitVersion.java): Wrapper class for `git --version` functionality. Obtains the current git version of the environment that RepoSense is being run on.
* [`GitVersion`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitVersion.java): Wrapper class for `git --version` functionality. Obtains the current Git version of the environment that RepoSense is being run on.

<box type="info" seamless>

Expand Down
2 changes: 1 addition & 1 deletion docs/dg/learningBasics.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ It is necessary for you to learn the basics of Vue.js, Pug, and SCSS before work
<box type="info" seamless>

Vue.js uses JavaScript as its programming language. Before learning **Vue.js**, you may need to first get yourself familiar with JavaScript syntax first.
You can refer to the [Javascript documentation](https://devdocs.io/javascript/) to learn the basic syntax. There are plenty of other resources available and please feel free to find the resource most suitable for you. Do note that RepoSense uses ES6 over CommonJS.
You can refer to the [Javascript documentation](https://devdocs.io/javascript/) to learn the basic syntax. There are plenty of other resources available and please feel free to find the resource most suitable for you.
</box>

RepoSense uses **Vue.js** (Vue3) in its front-end implementation. In particular, major user interface components, such as [summary view](report.html#summary-view-v-summary-js), [authorship view](report.html#authorship-view-v-authorship-js), and [zoom view](report.html#zoom-view-v-zoom-js), are implemented as Vue components. The corresponding source files are in `frontend/src`.
Expand Down
2 changes: 1 addition & 1 deletion docs/dg/report.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The tabbed interface is responsible for loading various modules such as authorsh

- **summary.json** - a list of all the repositories and their respective details
- **projName/commits.json** - contains information of the users' commits information (e.g., line deletion, insertion, etc.), grouped by date
- **projName/authorship.json** - contains information from git blame, detailing the author of each line for all the processed files
- **projName/authorship.json** - contains information from `git blame`, detailing the author of each line for all the processed files

<!-- ==================================================================================================== -->

Expand Down
2 changes: 1 addition & 1 deletion docs/dg/settingUp.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
**Prerequisites:**
* **JDK `11.0.21+9`** up to **`17`** ([download :fas-download:](https://www.oracle.com/technetwork/java/javase/downloads/index.html)).
* **Node.js** **`18`** up to the latest minor version of **`19`** ([download :fas-download:](https://www.npmjs.com/get-npm)).
* **git `2.23`** or later ([download :fas-download:](https://git-scm.com/downloads)).
* **Git `2.23`** or later ([download :fas-download:](https://git-scm.com/downloads)).

<box type="info" seamless>

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<h1 class="display-3">RepoSense</h1>
<div class="lead">

Visualize programmer activities across git repositories...
Visualize programmer activities across Git repositories...
<br><br>
<img src="images/reposenseOverview.png" width="909" alt="RepoSense overview"/>
<br><br>
Expand Down
5 changes: 5 additions & 0 deletions docs/ug/blurbs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
https://github.com/reposense/RepoSense/tree/cypress
Cypress branch of RepoSense
<!--repo-->------------------------------------
https://github.com/reposense/publish-RepoSense/tree/master
Publishing branch of RepoSense
2 changes: 1 addition & 1 deletion docs/ug/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ credit is given.
### `--repo`, `--repos`, `-r`

**`--repo REPO_LOCATION`**: Specifies which repositories to analyze.
* Parameter: `REPO_LOCATION` A list of URLs or the disk location of the git repositories to analyze, separated by spaces.
* Parameter: `REPO_LOCATION` A list of URLs or the disk location of the Git repositories to analyze, separated by spaces.
* Alias: `-r`
* Examples:
* `--repos https://github.com/reposense/RepoSense.git`
Expand Down
38 changes: 25 additions & 13 deletions docs/ug/configFiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Optionally, you can use an `author-config.csv` (which should be in the same dire
| Author's Git Host ID<sup>#</sup> {{ mandatory }} | Username of the target author's profile on GitHub, GitLab or Bitbucket, e.g.`JohnDoe`. |
| Author's Emails<sup>*</sup> | Associated emails of the author. For GitHub users, this can be found in your [GitHub settings](https://github.com/settings/emails). |
| Author's Display Name | The name to display for the author. Default: author's username. |
| Author's Git Author Name<sup>*</sup> | The meaning of _Git Author Name_ is explained in [_A note about git author name_](#a-note-about-git-author-name). |
| Author's Git Author Name<sup>*</sup> | The meaning of _Git Author Name_ is explained in [_A note about Git author name_](#a-note-about-git-author-name). |
| Ignore Glob List<sup>*</sup> | Files to ignore for this author, in addition to files ignored by the patterns specified in `repo-config.csv`. The path glob syntax is the same as that of Ignore Glob List in `repo-config.csv`. |

<sup>* **Multi-value column**: multiple values can be entered in this column using a semicolon `;` as the separator.</sup>
Expand Down Expand Up @@ -117,13 +117,11 @@ Note: All fields should be defined, and left blank if not used.

**Fields to provide**:
* `title`: Title of the generated report, which is also the title of the deployed dashboard. Default: "RepoSense Report".
* `group-details`: Details regarding the different custom groupings of files in your repository (refer to the section on `group-config.csv` for more information).
* `repo`: The `Remote Repo URL` or `Disk Path` to the git repository.
* `groups`: A list of the different custom groupings.
* `group-name`: Name of the group.
* `globs`: The list of file path globs to include for specified group.
* `repos`: A list of repositories to include for analysis.
* `repo`: The URL to your repository of interest.
* `groups`: A list of the different custom groupings.
* `group-name`: Name of the group.
* `globs`: The list of file path globs to include for specified group.
* `branches`: A list of branches to analyse for each repository.
* `branch`: The name of the branch.
* `authors`: A list of authors to analyse on the branch.
Expand All @@ -147,7 +145,7 @@ Note: All fields should be defined, and left blank if not used.

Repo owners can provide the following additional information to RepoSense using a config file that we call the **_standalone config file_**:
* which files/authors/commits to analyze/omit
* which git and git host usernames belong to which authors
* which Git and Git host usernames belong to which authors
* the display of an author

To use this feature, add a `_reposense/config.json` to the root of your repo using the format in the example below ([another example](https://github.com/reposense/RepoSense/blob/master/_reposense/config.json)) and **commit it** (reason: RepoSense can see committed code only):
Expand Down Expand Up @@ -185,17 +183,17 @@ Note: all fields are optional unless specified otherwise.
**Fields to provide _author-level_ info**:<br>
Note: `authors` field should contain _all_ authors that should be captured in the analysis.
* `gitId`: Username of the author. {{ mandatory }} field.
* `emails`: Associated git emails of the author. For GitHub, this can be found in your [GitHub settings](https://github.com/settings/emails).
* `emails`: Associated Git emails of the author. For GitHub, this can be found in your [GitHub settings](https://github.com/settings/emails).
* `displayName`: Name to display on the report for this author.
* `authorNames`: Git Author Name(s) used in the author's commits. By default, RepoSense assumes an author would use their remote Git Host username as the Git username too. The meaning of _Git Author Name_ is explained in [_A note about git author name_](#a-note-about-git-author-name).
* `authorNames`: Git Author Name(s) used in the author's commits. By default, RepoSense assumes an author would use their remote Git Host username as the Git username too. The meaning of _Git Author Name_ is explained in [_A note about Git author name_](#a-note-about-git-author-name).
* `ignoreGlobList`: _Additional_ (i.e. on top of the repo-level `ignoreGlobList`) folders/files to ignore for a specific author. The path glob syntax is specified by the [_glob format_](https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob). In the example above, the actual `ignoreGlobList` for `alice` would be `["about-us/**", "**index.html", "**.css"]`.

To verify your standalone configuration is as intended, add the `_reposense/config.json` to your local copy of repo and run RepoSense against it as follows:<br>
* Format: `java -jar RepoSense.jar --repo LOCAL_REPO_LOCATION` <br>
* Example: `java -jar RepoSense.jar --repo c:/myRepose/foo/bar`<br>
After that, view the report to see if the configuration you specified in the config file is being reflected correctly in the report.

## A note about git author name
## A note about Git author name

`Git Author Name` refers to the customizable author's display name set in the local `.gitconfig` file. For example, in the Git Log's display:
``` {.no-line-numbers}
Expand All @@ -214,15 +212,15 @@ Date: Fri Feb 9 19:13:13 2018 +0800
...
```
`ActualGitHostId` and `ConfiguredAuthorName` are both `Git Author Name` of the same author.<br>
To find the author name that you are currently using for your current git repository, run the following command within your git repository:
To find the author name that you are currently using for your current Git repository, run the following command within your Git repository:
``` shell {.no-line-numbers}
git config user.name
```
To set the author name to the value you want (e.g., to set it to your GitHub username) for your current git repository, you can use the following command ([more info](https://www.git-tower.com/learn/git/faq/change-author-name-email)):
To set the author name to the value you want (e.g., to set it to your GitHub username) for your current Git repository, you can use the following command ([more info](https://www.git-tower.com/learn/git/faq/change-author-name-email)):
``` shell {.no-line-numbers}
git config user.name "YOUR_AUTHOR_NAME”
```
To set the author name to use a default value you want for future git repositories, you can use the following command:
To set the author name to use a default value you want for future Git repositories, you can use the following command:
``` shell {.no-line-numbers}
git config --global user.name "YOUR_AUTHOR_NAME”
```
Expand All @@ -234,3 +232,17 @@ Note: Symbols such as `"`, `!`, `/` etc. in your author name will be omitted, wh
</box>

</div>

<!-- ==================================================================================================== -->

<div id="section-blurbs">

## `blurbs.md`

You can optionally use `blurbs.md` to add blurbs in Markdown syntax for repository branches. These blurbs will be seen when grouping by `Repo/Branch`. ([example](https://github.com/reposense/RepoSense/blob/master/docs/ug/blurbs.md))

**Format**:
* First line in section: Link to the repository branch.
* Second line onwards: Blurb content.
* Delimiter: `<!--repo-->`. Everything on the line after the delimiter will be ignored.
</div>
Loading

0 comments on commit 4b409f9

Please sign in to comment.