-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
GitHub's IDs have certain requirements to be valid, but Git does not have such requirements. This is evident in .gitconfig files, where the username can be set to anything the user may like. The current validation regex is based off GitHub's ID requirement. However, we are currently relying on Git author names found in .gitconfig files to attribute code authorship. This may result in missing code authorship attribution, when the Git author names do not match GitHub's ID requirements. Let's remove this restriction to allow any valid author names to be accepted and properly attributed.
- Loading branch information
Showing
10 changed files
with
84 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...esources/LocalRepoSystemTest/testRelativePathing/parent1_test-repo_master/authorship.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"path":"README.md","fileType":"md","lines":[{"lineNumber":1,"author":{"gitId":"eugenepeh"},"content":"This is a test repository for [RepoSense](https://github.com/reposense/RepoSense)."}],"authorContributionMap":{"eugenepeh":1}},{"path":"_reposense/config.json","fileType":"json","lines":[{"lineNumber":1,"author":{"gitId":"Eugene Peh"},"content":"{"},{"lineNumber":2,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"about-us/**\", \"**index.html\"],"},{"lineNumber":3,"author":{"gitId":"Eugene Peh"},"content":" \"formats\": [\"html\", \"css\"],"},{"lineNumber":4,"author":{"gitId":"FH-30"},"content":" \"ignoreCommitsList\": [\"\", \"67890def\"],"},{"lineNumber":5,"author":{"gitId":"Eugene Peh"},"content":" \"authors\":"},{"lineNumber":6,"author":{"gitId":"Eugene Peh"},"content":" ["},{"lineNumber":7,"author":{"gitId":"Eugene Peh"},"content":" {"},{"lineNumber":8,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"alice\","},{"lineNumber":9,"author":{"gitId":"Eugene Peh"},"content":" \"displayName\": \"Alice T.\","},{"lineNumber":10,"author":{"gitId":"Eugene Peh"},"content":" \"authorNames\": [\"AT\", \"A\"],"},{"lineNumber":11,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"**.css\"]"},{"lineNumber":12,"author":{"gitId":"Eugene Peh"},"content":" },"},{"lineNumber":13,"author":{"gitId":"Eugene Peh"},"content":" {"},{"lineNumber":14,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"bob\""},{"lineNumber":15,"author":{"gitId":"Eugene Peh"},"content":" }"},{"lineNumber":16,"author":{"gitId":"Eugene Peh"},"content":" ]"},{"lineNumber":17,"author":{"gitId":"Eugene Peh"},"content":"}"}],"authorContributionMap":{"FH-30":1,"Eugene Peh":16}},{"path":"annotationTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"fakeAuthor"},"content":"fake all the lines in this file is writtened by fakeAuthor"},{"lineNumber":2,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg"},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author"},{"lineNumber":10,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":11,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":12,"author":{"gitId":"-"},"content":"//@@author -invalidGitUsername_TreatedAsUnknownUser"},{"lineNumber":13,"author":{"gitId":"-"},"content":"unknown"},{"lineNumber":14,"author":{"gitId":"-"},"content":"System.out.println(\"//@@author invalidAuthorLineFormat\"); unknown"},{"lineNumber":15,"author":{"gitId":"-"},"content":"unknown"},{"lineNumber":16,"author":{"gitId":"-"},"content":"//@@author"},{"lineNumber":17,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":18,"author":{"gitId":"fakeAuthor"},"content":"//@@author harryggg invalidAuthorLineFormat"},{"lineNumber":19,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":20,"author":{"gitId":"-"},"content":"//@@author"},{"lineNumber":21,"author":{"gitId":"-"},"content":"unknown"},{"lineNumber":22,"author":{"gitId":"-"},"content":"unknown"}],"authorContributionMap":{"fakeAuthor":9,"harryggg":5,"-":8}},{"path":"blameTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3"}],"authorContributionMap":{"fakeAuthor":1,"harryggg":3}},{"path":"newFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4"}],"authorContributionMap":{"harryggg":4}},{"path":"space test.txt","fileType":"txt","lines":[{"lineNumber":1,"author":{"gitId":"chan-j-d"},"content":"1"}],"authorContributionMap":{"chan-j-d":1}}] | ||
[{"path":"README.md","fileType":"md","lines":[{"lineNumber":1,"author":{"gitId":"eugenepeh"},"content":"This is a test repository for [RepoSense](https://github.com/reposense/RepoSense)."}],"authorContributionMap":{"eugenepeh":1}},{"path":"_reposense/config.json","fileType":"json","lines":[{"lineNumber":1,"author":{"gitId":"Eugene Peh"},"content":"{"},{"lineNumber":2,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"about-us/**\", \"**index.html\"],"},{"lineNumber":3,"author":{"gitId":"Eugene Peh"},"content":" \"formats\": [\"html\", \"css\"],"},{"lineNumber":4,"author":{"gitId":"FH-30"},"content":" \"ignoreCommitsList\": [\"\", \"67890def\"],"},{"lineNumber":5,"author":{"gitId":"Eugene Peh"},"content":" \"authors\":"},{"lineNumber":6,"author":{"gitId":"Eugene Peh"},"content":" ["},{"lineNumber":7,"author":{"gitId":"Eugene Peh"},"content":" {"},{"lineNumber":8,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"alice\","},{"lineNumber":9,"author":{"gitId":"Eugene Peh"},"content":" \"displayName\": \"Alice T.\","},{"lineNumber":10,"author":{"gitId":"Eugene Peh"},"content":" \"authorNames\": [\"AT\", \"A\"],"},{"lineNumber":11,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"**.css\"]"},{"lineNumber":12,"author":{"gitId":"Eugene Peh"},"content":" },"},{"lineNumber":13,"author":{"gitId":"Eugene Peh"},"content":" {"},{"lineNumber":14,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"bob\""},{"lineNumber":15,"author":{"gitId":"Eugene Peh"},"content":" }"},{"lineNumber":16,"author":{"gitId":"Eugene Peh"},"content":" ]"},{"lineNumber":17,"author":{"gitId":"Eugene Peh"},"content":"}"}],"authorContributionMap":{"FH-30":1,"Eugene Peh":16}},{"path":"annotationTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"fakeAuthor"},"content":"fake all the lines in this file is writtened by fakeAuthor"},{"lineNumber":2,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg"},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author"},{"lineNumber":10,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":11,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":12,"author":{"gitId":"-invalidGitUsername_TreatedAsUnknownUser"},"content":"//@@author -invalidGitUsername_TreatedAsUnknownUser"},{"lineNumber":13,"author":{"gitId":"-invalidGitUsername_TreatedAsUnknownUser"},"content":"unknown"},{"lineNumber":14,"author":{"gitId":"-invalidGitUsername_TreatedAsUnknownUser"},"content":"System.out.println(\"//@@author invalidAuthorLineFormat\"); unknown"},{"lineNumber":15,"author":{"gitId":"-invalidGitUsername_TreatedAsUnknownUser"},"content":"unknown"},{"lineNumber":16,"author":{"gitId":"-invalidGitUsername_TreatedAsUnknownUser"},"content":"//@@author"},{"lineNumber":17,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":18,"author":{"gitId":"harryggg invalidAuthorLineFormat"},"content":"//@@author harryggg invalidAuthorLineFormat"},{"lineNumber":19,"author":{"gitId":"harryggg invalidAuthorLineFormat"},"content":"fake"},{"lineNumber":20,"author":{"gitId":"harryggg invalidAuthorLineFormat"},"content":"//@@author"},{"lineNumber":21,"author":{"gitId":"fakeAuthor"},"content":"unknown"},{"lineNumber":22,"author":{"gitId":"fakeAuthor"},"content":"unknown"}],"authorContributionMap":{"fakeAuthor":9,"-invalidGitUsername_TreatedAsUnknownUser":5,"harryggg":5,"harryggg invalidAuthorLineFormat":3}},{"path":"blameTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3"}],"authorContributionMap":{"fakeAuthor":1,"harryggg":3}},{"path":"newFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4"}],"authorContributionMap":{"harryggg":4}},{"path":"space test.txt","fileType":"txt","lines":[{"lineNumber":1,"author":{"gitId":"chan-j-d"},"content":"1"}],"authorContributionMap":{"chan-j-d":1}}] |
Oops, something went wrong.