-
Notifications
You must be signed in to change notification settings - Fork 154
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
There are still leftover references specific to GitHub on parts of the codebase and docs that have been generalized to accept other remote git hosts. Let's update these GitHub references to use more general language.
- Loading branch information
Showing
21 changed files
with
89 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,14 +135,14 @@ To use this feature, add a `_reposense/config.json` to the root of your repo usi | |
"authors": | ||
[ | ||
{ | ||
"githubId": "alice", | ||
"gitId": "alice", | ||
"emails": ["[email protected]", "[email protected]"], | ||
"displayName": "Alice T.", | ||
"authorNames": ["AT", "A"], | ||
"ignoreGlobList": ["**.css"] | ||
}, | ||
{ | ||
"githubId": "bob" | ||
"gitId": "bob" | ||
} | ||
] | ||
} | ||
|
@@ -159,10 +159,10 @@ 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. | ||
* `githubId`: Username of the author. {{ mandatory }} field. | ||
* `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). | ||
* `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 her GitHub 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> | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,15 +15,26 @@ public class AuthorTest { | |
|
||
@Test | ||
public void setEmail_validEmails_success() { | ||
Author author = new Author("Tester"); | ||
String[] emails = new String[] {"[email protected]", "[email protected]"}; | ||
|
||
author.setEmails(Arrays.asList(emails)); | ||
List<String> emails = new ArrayList<>(); | ||
emails.add("[email protected]"); | ||
emails.add("[email protected]"); | ||
|
||
// The additional 1 email comes from the Standard GitHub Email. | ||
Assertions.assertEquals(emails.length + 1, author.getEmails().size()); | ||
|
||
Assertions.assertTrue(author.getEmails().containsAll(Arrays.asList(emails))); | ||
Author author = new Author("Tester"); | ||
author.setEmails(emails); | ||
// The additional 2 emails comes from the Standard GitHub & Gitlab Emails. | ||
Assertions.assertEquals(emails.size() + 2, author.getEmails().size()); | ||
Assertions.assertTrue(author.getEmails().containsAll(emails)); | ||
|
||
emails.add("[email protected]"); | ||
author.setEmails(emails); | ||
// The additional 1 email comes from the Gitlab email as the standard GitHub has already been included. | ||
Assertions.assertEquals(emails.size() + 1, author.getEmails().size()); | ||
Assertions.assertTrue(author.getEmails().containsAll(emails)); | ||
|
||
emails.add("[email protected]"); | ||
author.setEmails(emails); | ||
Assertions.assertEquals(emails.size(), author.getEmails().size()); | ||
Assertions.assertTrue(author.getEmails().containsAll(emails)); | ||
} | ||
|
||
@Test | ||
|
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 |
---|---|---|
|
@@ -92,7 +92,8 @@ public class AuthorConfigParserTest { | |
.collect(Collectors.toMap(entry -> entry.getKey(), entry -> entry.getValue())); | ||
|
||
private static final List<String> FIRST_AUTHOR_EMAIL_LIST = | ||
Arrays.asList("[email protected]", "[email protected]", "[email protected]"); | ||
Arrays.asList("[email protected]", "[email protected]", "[email protected]", | ||
"[email protected]"); | ||
|
||
@Test | ||
public void authorConfig_noSpecialCharacter_success() throws Exception { | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"authors": | ||
[ | ||
{ | ||
"githubId": "yong24s" | ||
"gitId": "yong24s" | ||
} | ||
] | ||
} |
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 |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
"authors": | ||
[ | ||
{ | ||
"githubId": "yong24s" | ||
"gitId": "yong24s" | ||
}, | ||
] |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"authors": | ||
[ | ||
{ | ||
"githubId": "yong24s", | ||
"gitId": "yong24s", | ||
"level": "1" | ||
}, | ||
] | ||
|
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
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
Oops, something went wrong.