Skip to content

Conversation

@FH-30
Copy link
Owner

@FH-30 FH-30 commented Jul 1, 2021

Adding a --catch-non-pr-commits or -C flag when running Reposense.jar or adding a yes in the Catch Non PR Commits column in repo-config.csv will trigger reposense to detect the number of commits each person has made that did not go through a pull request.

I remember that such commits in CS2103T are frowned upon a lot and noticed that reposense has no way of automatically catching such commits. After looking through developer tools in the browser I realized that github checks if a commit belongs to some pr through a certain URL and utilized that in the implementation of this enhancement.

I have only managed to implement the backend aspect of this and have yet to integrate it with the frontend. Proof that it works:

Commit which was directly pushed into repo without a pull request:
Commit URL: FH-30/Test-Repo@ab16e85

Screen Shot 2021-07-01 at 7 08 07 PM

Commit which went through a pull request:
Commit URL: FH-30/Test-Repo@b21b50a

Screen Shot 2021-07-01 at 7 09 33 PM

I have also compiled everything into a map which is displayed at the end of the commits.json file RepoSense generates as can be seen in the picture below:

Screen Shot 2021-07-01 at 7 10 32 PM

Commits.json file inside a zip file relevant to discussion:
commits.json.zip

I have yet to add tests, documentation and have not checked checkstyle tests. I won't mind doing it if you would like!

Hope this clarifies!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants