diff --git a/docs/dg/architecture.md b/docs/dg/architecture.md index 1d76d2166a..f7d9d4f4ac 100644 --- a/docs/dg/architecture.md +++ b/docs/dg/architecture.md @@ -31,7 +31,7 @@ * [`GitBranch`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitBranch.java): Wrapper class for `git branch` functionality. Gets the name of the working branch of the target repo. * [`GitCatFile`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitCatFile.java): Wrapper class for `git cat-file` functionality. Obtains the parent commit hash with the given commit indicated by the commit hash. * [`GitCheckout`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitCheckout.java): Wrapper class for `git checkout` functionality. Checks out the repository by branch name or commit hash. - * [`GitClone`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitClone.java): Wrapper class for `git clone` functionality. Clones the repository from *GitHub* into a temporary folder in order to run the analysis. + * [`GitClone`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitClone.java): Wrapper class for `git clone` functionality. Clones the repository from the given URL or local directory into a temporary folder in order to run the analysis. * [`GitDiff`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitDiff.java): Wrapper class for `git diff` functionality. Obtains the changes between commits. * [`GitLog`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitLog.java): Wrapper class for `git log` functionality. Obtains the commit logs and the authors' info. * [`GitRevList`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/git/GitRevList.java): Wrapper class for `git rev-list` functionality. Retrieves the commit objects in reverse chronological order. @@ -93,7 +93,7 @@ Note that when constructing new commands containing path arguments, use the `Str ## Model [`Model`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/model) holds the data structures that are commonly used by the different aspects of *RepoSense*. - * [`Author`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/model/Author.java) stores the `GitHub ID` of an author. Any contributions or commits made by the author, using his/her `GitHub ID` or aliases, will be attributed to the same `Author` object. `AuthorshipReporter` and `CommitsReporter` use it to attribute the commit and file contributions to the respective authors. + * [`Author`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/model/Author.java) stores the `Git ID` of an author. Any contributions or commits made by the author, using his/her `Git ID` or aliases, will be attributed to the same `Author` object. `AuthorshipReporter` and `CommitsReporter` use it to attribute the commit and file contributions to the respective authors. * [`CliArguments`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/model/CliArguments.java) stores the parsed command-line arguments supplied by the user. It contains the configuration settings such as the CSV config file to read from, the directory to output the report to, and the date range of commits to analyze. These configuration settings are passed into `RepoConfiguration`. * [`FileTypeManager`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/model/FileTypeManager.java) stores the file format to be analyzed and the custom groups specified by the user for any repository. * [`RepoConfiguration`](https://github.com/reposense/RepoSense/blob/master/src/main/java/reposense/model/RepoConfiguration.java) stores the configuration information from the CSV config file for a single repository: the repository's organization, name, branch, list of authors to analyze, date range to analyze commits, and files from `CliArguments`. diff --git a/docs/ug/configFiles.md b/docs/ug/configFiles.md index a25fa0dfc1..cb74d8ffff 100644 --- a/docs/ug/configFiles.md +++ b/docs/ug/configFiles.md @@ -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": ["alice@example.com", "alicet@example.com"], "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**:
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:
diff --git a/docs/ug/troubleshooting.md b/docs/ug/troubleshooting.md index ea2b041395..bed68b62e0 100644 --- a/docs/ug/troubleshooting.md +++ b/docs/ug/troubleshooting.md @@ -10,10 +10,10 @@ ### Contributions missing in the ramp chart (but appear in the contribution bar and code panel) -This is probably a case of giving an incorrect author name alias (or GitHub ID) in your [author-config file](./configFiles.md#author-config-csv).
+This is probably a case of giving an incorrect author name alias (or Git ID) in your [author-config file](./configFiles.md#author-config-csv).
Please refer to [A Note About Git Author Name](./configFiles.md#a-note-about-git-author-name) above on how to find out the correct author name you are using and how to change it.
Also, ensure that you have added all author name aliases you may be using (if you are using multiple computers or have previously changed your author name).
-Alternatively, you may choose to configure *RepoSense* to track using your GitHub email instead of in your [standalone config file](./configFiles.md#config-json-standalone-config-file) or [author-config file](./configFiles.md#author-config-csv), which is more accurate compared to author name aliases. The associated GitHub email you are using can be found in your [GitHub settings](https://github.com/settings/emails). +Alternatively, you may choose to configure *RepoSense* to track the email associated with your local Git config or remote Git host email in a [standalone config file](./configFiles.md#config-json-standalone-config-file) or [author-config file](./configFiles.md#author-config-csv), which is more accurate compared to author name aliases. For GitHub, the associated email you are using can be found in your [GitHub settings](https://github.com/settings/emails). diff --git a/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js b/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js index 0ee3010da1..ac497b1f03 100644 --- a/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js +++ b/frontend/cypress/tests/chartView/chartView_zoomFeature.cy.js @@ -281,7 +281,7 @@ describe('range changes in chartview should reflect in zoom', () => { .get('#summary-charts .summary-chart__ramp .ramp') .first() .click(120, 20) - .click(200, 20); + .click(170, 20); cy.get('#tab-zoom') .should('be.visible'); @@ -306,7 +306,7 @@ describe('range changes in chartview should reflect in zoom', () => { cy.get('body').type(zoomKey, { release: false }) .get('#summary-charts .summary-chart__ramp .ramp') .first() - .click(200, 20) + .click(170, 20) .click(250, 20); cy.get('#tab-zoom') @@ -334,7 +334,7 @@ describe('range changes in chartview should reflect in zoom', () => { cy.get('body').type(zoomKey, { release: false }) .get('#summary-charts .summary-chart__ramp .ramp') .first() - .click(200, 20) + .click(170, 20) .click(225, 20); cy.get('#tab-zoom') diff --git a/frontend/src/styles/_z-indices.scss b/frontend/src/styles/_z-indices.scss index aca88ed396..b918fe10b6 100644 --- a/frontend/src/styles/_z-indices.scss +++ b/frontend/src/styles/_z-indices.scss @@ -16,4 +16,5 @@ $z-indices: ( 'header': 100, 'loader': 10, 'tooltip': 100, + 'max-value': 250, ); diff --git a/frontend/src/styles/style.scss b/frontend/src/styles/style.scss index e3a6789c60..5cd38a53a7 100644 --- a/frontend/src/styles/style.scss +++ b/frontend/src/styles/style.scss @@ -107,7 +107,6 @@ a.broken-link { } &.bottom-aligned { - @include medium-font; bottom: auto; top: 125%; } diff --git a/frontend/src/views/c-authorship.vue b/frontend/src/views/c-authorship.vue index fd6039059a..9fe5082b4c 100644 --- a/frontend/src/views/c-authorship.vue +++ b/frontend/src/views/c-authorship.vue @@ -101,19 +101,22 @@ .empty(v-if="info.files.length === 0") nothing to see here :( template(v-for="(file, i) in selectedFiles", v-bind:key="file.path") .file(v-bind:ref="file.path") - .title(v-bind:class="{'sticky':\ file.active}") + .title( + v-bind:class="{'sticky':\ file.active}", + v-bind:ref="`${file.path}-title`" + ) span.caret(v-on:click="toggleFileActiveProperty(file)") .tooltip( v-show="file.active", - v-on:mouseover="onTooltipHover(`${file.path}-hide-file-tooltip`)", - v-on:mouseout="resetTooltip(`${file.path}-hide-file-tooltip`)" + v-on:mouseover="onTitleTooltipHover(`${file.path}-hide-file-tooltip`, `${file.path}-title`)", + v-on:mouseout="resetTitleTooltip(`${file.path}-hide-file-tooltip`, `${file.path}-title`)" ) font-awesome-icon(icon="caret-down", fixed-width) span.tooltip-text(v-bind:ref="`${file.path}-hide-file-tooltip`") Click to hide file details .tooltip( v-show="!file.active", - v-on:mouseover="onTooltipHover(`${file.path}-show-file-tooltip`)", - v-on:mouseout="resetTooltip(`${file.path}-show-file-tooltip`)" + v-on:mouseover="onTitleTooltipHover(`${file.path}-show-file-tooltip`, `${file.path}-title`)", + v-on:mouseout="resetTitleTooltip(`${file.path}-show-file-tooltip`, `${file.path}-title`)" ) font-awesome-icon(icon="caret-right", fixed-width) span.tooltip-text(v-bind:ref="`${file.path}-show-file-tooltip`") Click to show file details @@ -148,18 +151,28 @@ v-bind:class="!isBrokenLink(getHistoryLink(file)) ? '' : 'broken-link'", v-bind:href="getHistoryLink(file)", target="_blank" ) - .tooltip + .tooltip( + v-on:mouseover="onTitleTooltipHover(`${file.path}-view-history-tooltip`, `${file.path}-title`)", + v-on:mouseout="resetTitleTooltip(`${file.path}-view-history-tooltip`, `${file.path}-title`)" + ) font-awesome-icon.button(icon="history") - span.tooltip-text {{getLinkMessage(getHistoryLink(file), 'Click to view the history view of file')}} + span.tooltip-text( + v-bind:ref="`${file.path}-view-history-tooltip`" + ) {{getLinkMessage(getHistoryLink(file), 'Click to view the history view of file')}} a( v-if='!file.isBinary', v-bind:class="!isBrokenLink(getBlameLink(file)) ? '' : 'broken-link'", v-bind:href="getBlameLink(file)", target="_blank", title="click to view the blame view of file" ) - .tooltip + .tooltip( + v-on:mouseover="onTitleTooltipHover(`${file.path}-view-blame-tooltip`, `${file.path}-title`)", + v-on:mouseout="resetTitleTooltip(`${file.path}-view-blame-tooltip`, `${file.path}-title`)" + ) font-awesome-icon.button(icon="user-edit") - span.tooltip-text {{getLinkMessage(getBlameLink(file), 'Click to view the blame view of file')}} + span.tooltip-text( + v-bind:ref="`${file.path}-view-blame-tooltip`" + ) {{getLinkMessage(getBlameLink(file), 'Click to view the blame view of file')}} .author-breakdown(v-if="info.isMergeGroup") .author-breakdown__legend( v-for="author in getAuthors(file)", @@ -186,6 +199,7 @@ import { defineComponent } from 'vue'; import { mapState } from 'vuex'; import minimatch from 'minimatch'; import brokenLinkDisabler from '../mixin/brokenLinkMixin'; +import tooltipPositioner from '../mixin/dynamicTooltipMixin'; import cSegmentCollection from '../components/c-segment-collection.vue'; import Segment from '../utils/segment'; import getNonRepeatingColor from '../utils/random-color-generator'; @@ -229,7 +243,7 @@ export default defineComponent({ components: { cSegmentCollection, }, - mixins: [brokenLinkDisabler], + mixins: [brokenLinkDisabler, tooltipPositioner], emits: [ 'deactivate-tab', ], @@ -488,20 +502,16 @@ export default defineComponent({ } }, - onTooltipHover(refName: string): void { - const tooltipTextElement = (this.$refs[refName] as HTMLElement[])[0]; - if (this.isElementAboveViewport(tooltipTextElement)) { - tooltipTextElement.classList.add('bottom-aligned'); - } - }, - - resetTooltip(refName: string): void { - const tooltipTextElement = (this.$refs[refName] as HTMLElement[])[0]; - tooltipTextElement.classList.remove('bottom-aligned'); + onTitleTooltipHover(tooltipTextElement: string, titleTextElement: string): void { + this.onTooltipHover(tooltipTextElement); + const titleElement = (this.$refs[titleTextElement] as HTMLElement[])[0]; + titleElement.classList.add('max-zIndex'); }, - isElementAboveViewport(el: Element): boolean { - return el.getBoundingClientRect().top <= 0; + resetTitleTooltip(tooltipTextElement: string, titleTextElement: string): void { + this.resetTooltip(tooltipTextElement); + const titleElement = (this.$refs[titleTextElement] as HTMLElement[])[0]; + titleElement.classList.remove('max-zIndex'); }, isUnknownAuthor(name: string): boolean { @@ -511,7 +521,6 @@ export default defineComponent({ splitSegments(lines: Line[]): { segments: Segment[]; blankLineCount: number; } { // split into segments separated by knownAuthor let lastState: string | null; - let lastCreditState: boolean; let lastId = -1; const segments: Segment[] = []; let blankLineCount = 0; @@ -521,19 +530,16 @@ export default defineComponent({ ? !this.isUnknownAuthor(line.author.gitId) : line.author.gitId === this.info.author; const knownAuthor = (line.author && isAuthorMatched) ? line.author.gitId : null; - const isFullCredit = line.isFullCredit; - if (knownAuthor !== lastState || lastId === -1 || (knownAuthor && isFullCredit !== lastCreditState)) { + if (knownAuthor !== lastState || lastId === -1) { segments.push(new Segment( knownAuthor, - isFullCredit, [], [], )); lastId += 1; lastState = knownAuthor; - lastCreditState = isFullCredit; } const content = line.content || ' '; @@ -891,6 +897,10 @@ export default defineComponent({ position: sticky; } + &.max-zIndex { + z-index: z-index('max-value'); + } + .caret { cursor: pointer; order: -2; @@ -993,11 +1003,6 @@ export default defineComponent({ padding-left: 2rem; word-break: break-word; } - &.isNotFullCredit { - .code { - background-color: mui-color('green', '100'); - } - } &.untouched { $grey: mui-color('grey', '400'); border-left: .25rem solid $grey; diff --git a/src/main/java/reposense/model/Author.java b/src/main/java/reposense/model/Author.java index 88652f9c2d..39438920a8 100644 --- a/src/main/java/reposense/model/Author.java +++ b/src/main/java/reposense/model/Author.java @@ -13,7 +13,10 @@ public class Author { public static final String NAME_NO_AUTHOR_WITH_COMMITS_FOUND = "NO AUTHOR WITH COMMITS FOUND WITHIN THIS PERIOD OF TIME"; private static final String UNKNOWN_AUTHOR_GIT_ID = "-"; + private static final String STANDARD_GITHUB_EMAIL_DOMAIN = "@users.noreply.github.com"; + private static final String STANDARD_GITLAB_EMAIL_DOMAIN = "@users.noreply.gitlab.com"; + private static final String MESSAGE_UNCOMMON_EMAIL_PATTERN = "The provided email, %s, uses uncommon pattern."; private static final String MESSAGE_UNCOMMON_GLOB_PATTERN = "The provided ignore glob, %s, uses uncommon pattern."; private static final String COMMON_EMAIL_REGEX = @@ -37,14 +40,14 @@ public Author(String gitId) { this.authorAliases = new ArrayList<>(); this.ignoreGlobList = new ArrayList<>(); - addStandardGitHubEmail(this.emails); + addStandardGitHostEmails(this.emails); updateIgnoreGlobMatcher(); } public Author(StandaloneAuthor sa) { - String gitId = sa.getGithubId(); + String gitId = sa.getGitId(); List emails = new ArrayList<>(sa.getEmails()); - String displayName = !sa.getDisplayName().isEmpty() ? sa.getDisplayName() : sa.getGithubId(); + String displayName = !sa.getDisplayName().isEmpty() ? sa.getDisplayName() : sa.getGitId(); List authorAliases = sa.getAuthorNames(); List ignoreGlobList = sa.getIgnoreGlobList(); @@ -102,7 +105,7 @@ public List getEmails() { public void setEmails(List emails) { validateEmails(emails); this.emails = new ArrayList<>(emails); - addStandardGitHubEmail(this.emails); + addStandardGitHostEmails(this.emails); } public String getDisplayName() { @@ -188,13 +191,17 @@ private void updateIgnoreGlobMatcher() { } /** - * Adds the standard github email to {@code emails} if doesn't exist. + * Adds the standard github and gitlab emails to {@code emails} if not present. */ - private void addStandardGitHubEmail(List emails) { + private void addStandardGitHostEmails(List emails) { String standardGitHubEmail = getGitId() + STANDARD_GITHUB_EMAIL_DOMAIN; + String standardGitLabEmail = getGitId() + STANDARD_GITLAB_EMAIL_DOMAIN; if (!emails.contains(standardGitHubEmail)) { emails.add(standardGitHubEmail); } + if (!emails.contains(standardGitLabEmail)) { + emails.add(standardGitLabEmail); + } } } diff --git a/src/main/java/reposense/model/AuthorConfiguration.java b/src/main/java/reposense/model/AuthorConfiguration.java index a3f780e9e1..bb2bdf85db 100644 --- a/src/main/java/reposense/model/AuthorConfiguration.java +++ b/src/main/java/reposense/model/AuthorConfiguration.java @@ -127,7 +127,7 @@ public List getAuthorList() { * and display name. */ private void setAuthorDetails(Author author) { - // Set GitHub Id and its corresponding email as default + // Set Git Id and its corresponding email as default addAuthorNamesToAuthorMapEntry(author, author.getGitId()); addAuthorNamesToAuthorMapEntry(author, author.getAuthorAliases()); diff --git a/src/main/java/reposense/model/StandaloneAuthor.java b/src/main/java/reposense/model/StandaloneAuthor.java index 07e9412fe0..fc6a9f6792 100644 --- a/src/main/java/reposense/model/StandaloneAuthor.java +++ b/src/main/java/reposense/model/StandaloneAuthor.java @@ -2,19 +2,26 @@ import java.util.Collections; import java.util.List; +import java.util.Optional; /** * Represents an author in {@link StandaloneConfig}. */ public class StandaloneAuthor { + + private String gitId; + // This is for backward compatibility with older standalone author configs that utilize the 'githubId' keyword. private String githubId; + private List emails; private String displayName; private List authorNames; private List ignoreGlobList; - public String getGithubId() { - return githubId; + public String getGitId() { + // This supports a standalone json file containing either keywords, prioritizing 'gitId'. + // To remove backward compatibility support, need to update the standalone json configs in test repositories. + return Optional.ofNullable(gitId).orElse(githubId); } public List getEmails() { @@ -44,7 +51,7 @@ public boolean equals(Object other) { } StandaloneAuthor otherStandaloneAuthor = (StandaloneAuthor) other; - return githubId.equals(otherStandaloneAuthor.githubId) + return gitId.equals(otherStandaloneAuthor.gitId) && getEmails().equals(otherStandaloneAuthor.getEmails()) && getDisplayName().equals(otherStandaloneAuthor.getDisplayName()) && getAuthorNames().equals(otherStandaloneAuthor.getAuthorNames()) diff --git a/src/main/java/reposense/parser/ArgsParser.java b/src/main/java/reposense/parser/ArgsParser.java index 00e24cc0dc..e0f42694b3 100644 --- a/src/main/java/reposense/parser/ArgsParser.java +++ b/src/main/java/reposense/parser/ArgsParser.java @@ -214,7 +214,7 @@ private static ArgumentParser getArgumentParser() { .nargs("+") .dest(REPO_FLAGS[0]) .metavar("LOCATION") - .help("The GitHub URL or disk locations to clone repository."); + .help("The remote Git host URLs or local directories to clone the repositories from."); mutexParser2.addArgument(LAST_MODIFIED_DATE_FLAGS) .dest(LAST_MODIFIED_DATE_FLAGS[0]) diff --git a/src/test/java/reposense/model/AuthorTest.java b/src/test/java/reposense/model/AuthorTest.java index abc4ff3ecd..25faa1efbb 100644 --- a/src/test/java/reposense/model/AuthorTest.java +++ b/src/test/java/reposense/model/AuthorTest.java @@ -15,15 +15,26 @@ public class AuthorTest { @Test public void setEmail_validEmails_success() { - Author author = new Author("Tester"); - String[] emails = new String[] {"tester@test.net", "developer@example.com"}; - - author.setEmails(Arrays.asList(emails)); + List emails = new ArrayList<>(); + emails.add("tester@test.net"); + emails.add("developer@example.com"); - // 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("Tester@users.noreply.github.com"); + 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("Tester@users.noreply.gitlab.com"); + author.setEmails(emails); + Assertions.assertEquals(emails.size(), author.getEmails().size()); + Assertions.assertTrue(author.getEmails().containsAll(emails)); } @Test diff --git a/src/test/java/reposense/parser/AuthorConfigParserTest.java b/src/test/java/reposense/parser/AuthorConfigParserTest.java index 66e958f240..7c5de1df4f 100644 --- a/src/test/java/reposense/parser/AuthorConfigParserTest.java +++ b/src/test/java/reposense/parser/AuthorConfigParserTest.java @@ -92,7 +92,8 @@ public class AuthorConfigParserTest { .collect(Collectors.toMap(entry -> entry.getKey(), entry -> entry.getValue())); private static final List FIRST_AUTHOR_EMAIL_LIST = - Arrays.asList("nbr@example.com", "nbriannl@test.net", "nbriannl@users.noreply.github.com"); + Arrays.asList("nbr@example.com", "nbriannl@test.net", "nbriannl@users.noreply.github.com", + "nbriannl@users.noreply.gitlab.com"); @Test public void authorConfig_noSpecialCharacter_success() throws Exception { diff --git a/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_full.json b/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_full.json index a3a91895dc..7199caa0bd 100644 --- a/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_full.json +++ b/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_full.json @@ -6,7 +6,7 @@ "authors": [ { - "githubId": "yong24s", + "gitId": "yong24s", "displayName": "Yong Hao", "authorNames": ["Yong Hao TENG"], "ignoreGlobList": ["**.css", "**.html", "**.jade", "**.js"] diff --git a/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_githubId_only.json b/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_githubId_only.json index 3c45efcbd6..167124c7b9 100644 --- a/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_githubId_only.json +++ b/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_githubId_only.json @@ -2,7 +2,7 @@ "authors": [ { - "githubId": "yong24s" + "gitId": "yong24s" } ] } diff --git a/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_malformedJson.json b/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_malformedJson.json index 1b283a4ef8..ed32307556 100644 --- a/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_malformedJson.json +++ b/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_malformedJson.json @@ -2,6 +2,6 @@ "authors": [ { - "githubId": "yong24s" + "gitId": "yong24s" }, ] diff --git a/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_unknownPropertyInJson.json b/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_unknownPropertyInJson.json index 7e66e07536..b920f70a37 100644 --- a/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_unknownPropertyInJson.json +++ b/src/test/resources/StandaloneConfigJsonParserTest/standaloneConfig_unknownPropertyInJson.json @@ -2,7 +2,7 @@ "authors": [ { - "githubId": "yong24s", + "gitId": "yong24s", "level": "1" }, ] diff --git a/src/test/resources/StandaloneConfigTest/authors_trailingCommas_config.json b/src/test/resources/StandaloneConfigTest/authors_trailingCommas_config.json index 9d55862b0a..997821542e 100644 --- a/src/test/resources/StandaloneConfigTest/authors_trailingCommas_config.json +++ b/src/test/resources/StandaloneConfigTest/authors_trailingCommas_config.json @@ -4,25 +4,25 @@ "authors": [ { - "githubId": "lithiumlkid", + "gitId": "lithiumlkid", "displayName": "Ahm", "authorNames": ["Ahmad Syafiq"], "ignoreGlobList": ["*.aa1", "**.aa2", "**.java"] }, { - "githubId": "codeeong", + "gitId": "codeeong", "displayName": "Cod", "authorNames": ["Codee"], "ignoreGlobList": ["**[!(.md)]"] }, { - "githubId": "jordancjq", + "gitId": "jordancjq", "displayName": "Jor", "authorNames": ["Jordan Chong"], "ignoreGlobList": [""] }, { - "githubId": "lohtianwei", + "gitId": "lohtianwei", "displayName": "Loh", "authorNames": ["Tianwei"] }, diff --git a/src/test/resources/StandaloneConfigTest/fileSizeLimit_config.json b/src/test/resources/StandaloneConfigTest/fileSizeLimit_config.json index c61d6e1d4a..b4f531537a 100644 --- a/src/test/resources/StandaloneConfigTest/fileSizeLimit_config.json +++ b/src/test/resources/StandaloneConfigTest/fileSizeLimit_config.json @@ -5,25 +5,25 @@ "authors": [ { - "githubId": "lithiumlkid", + "gitId": "lithiumlkid", "displayName": "Ahm", "authorNames": ["Ahmad Syafiq"], "ignoreGlobList": ["*.aa1", "**.aa2", "**.java"] }, { - "githubId": "codeeong", + "gitId": "codeeong", "displayName": "Cod", "authorNames": ["Codee"], "ignoreGlobList": ["**[!(.md)]"] }, { - "githubId": "jordancjq", + "gitId": "jordancjq", "displayName": "Jor", "authorNames": ["Jordan Chong"], "ignoreGlobList": [""] }, { - "githubId": "lohtianwei", + "gitId": "lohtianwei", "displayName": "Loh", "authorNames": ["Tianwei"] } diff --git a/src/test/resources/StandaloneConfigTest/invalidFormats_config.json b/src/test/resources/StandaloneConfigTest/invalidFormats_config.json index 2b5fe4fd45..1739796acf 100644 --- a/src/test/resources/StandaloneConfigTest/invalidFormats_config.json +++ b/src/test/resources/StandaloneConfigTest/invalidFormats_config.json @@ -4,25 +4,25 @@ "authors": [ { - "githubId": "lithiumlkid", + "gitId": "lithiumlkid", "displayName": "Ahm", "authorNames": ["Ahmad Syafiq"], "ignoreGlobList": ["*.aa1", "**.aa2", "**.java"] }, { - "githubId": "codeeong", + "gitId": "codeeong", "displayName": "Cod", "authorNames": ["Codee"], "ignoreGlobList": ["**[!(.md)]"] }, { - "githubId": "jordancjq", + "gitId": "jordancjq", "displayName": "Jor", "authorNames": ["Jordan Chong"], "ignoreGlobList": [""] }, { - "githubId": "lohtianwei", + "gitId": "lohtianwei", "displayName": "Loh", "authorNames": ["Tianwei"] } diff --git a/src/test/resources/StandaloneConfigTest/invalidIgnoreCommit_config.json b/src/test/resources/StandaloneConfigTest/invalidIgnoreCommit_config.json index d6a4d41fc1..8bdedcbc6f 100644 --- a/src/test/resources/StandaloneConfigTest/invalidIgnoreCommit_config.json +++ b/src/test/resources/StandaloneConfigTest/invalidIgnoreCommit_config.json @@ -4,25 +4,25 @@ "authors": [ { - "githubId": "lithiumlkid", + "gitId": "lithiumlkid", "displayName": "Ahm", "authorNames": ["Ahmad Syafiq"], "ignoreGlobList": ["*.aa1", "**.aa2", "**.java"] }, { - "githubId": "codeeong", + "gitId": "codeeong", "displayName": "Cod", "authorNames": ["Codee"], "ignoreGlobList": ["**[!(.md)]"] }, { - "githubId": "jordancjq", + "gitId": "jordancjq", "displayName": "Jor", "authorNames": ["Jordan Chong"], "ignoreGlobList": [""] }, { - "githubId": "lohtianwei", + "gitId": "lohtianwei", "displayName": "Loh", "authorNames": ["Tianwei"] } diff --git a/src/test/resources/StandaloneConfigTest/lithiumlkid_invalidIgnoreGlob_config.json b/src/test/resources/StandaloneConfigTest/lithiumlkid_invalidIgnoreGlob_config.json index 5f57f06132..7d6d160a6a 100644 --- a/src/test/resources/StandaloneConfigTest/lithiumlkid_invalidIgnoreGlob_config.json +++ b/src/test/resources/StandaloneConfigTest/lithiumlkid_invalidIgnoreGlob_config.json @@ -4,25 +4,25 @@ "authors": [ { - "githubId": "lithiumlkid", + "gitId": "lithiumlkid", "displayName": "Ahm", "authorNames": ["Ahmad Syafiq"], "ignoreGlobList": ["*.aa1", "&& echo test", "**.java"] }, { - "githubId": "codeeong", + "gitId": "codeeong", "displayName": "Cod", "authorNames": ["Codee"], "ignoreGlobList": ["**[!(.md)]"] }, { - "githubId": "jordancjq", + "gitId": "jordancjq", "displayName": "Jor", "authorNames": ["Jordan Chong"], "ignoreGlobList": [""] }, { - "githubId": "lohtianwei", + "gitId": "lohtianwei", "displayName": "Loh", "authorNames": ["Tianwei"] } diff --git a/src/test/resources/StandaloneConfigTest/lithiumlkid_trailingCommas_config.json b/src/test/resources/StandaloneConfigTest/lithiumlkid_trailingCommas_config.json index 99df07e06e..07c56e8175 100644 --- a/src/test/resources/StandaloneConfigTest/lithiumlkid_trailingCommas_config.json +++ b/src/test/resources/StandaloneConfigTest/lithiumlkid_trailingCommas_config.json @@ -4,25 +4,25 @@ "authors": [ { - "githubId": "lithiumlkid", + "gitId": "lithiumlkid", "displayName": "Ahm", "authorNames": ["Ahmad Syafiq"], "ignoreGlobList": ["*.aa1", "**.aa2", "**.java"], }, { - "githubId": "codeeong", + "gitId": "codeeong", "displayName": "Cod", "authorNames": ["Codee"], "ignoreGlobList": ["**[!(.md)]"] }, { - "githubId": "jordancjq", + "gitId": "jordancjq", "displayName": "Jor", "authorNames": ["Jordan Chong"], "ignoreGlobList": [""] }, { - "githubId": "lohtianwei", + "gitId": "lohtianwei", "displayName": "Loh", "authorNames": ["Tianwei"] } diff --git a/src/test/resources/StandaloneConfigTest/specialCharacterAuthor_config.json b/src/test/resources/StandaloneConfigTest/specialCharacterAuthor_config.json index 3eedd5ae82..4d9a71853b 100644 --- a/src/test/resources/StandaloneConfigTest/specialCharacterAuthor_config.json +++ b/src/test/resources/StandaloneConfigTest/specialCharacterAuthor_config.json @@ -4,17 +4,17 @@ "authors": [ { - "githubId": "‘Processed�‘Cooked�", + "gitId": "‘Processed�‘Cooked�", "displayName": "‘Processed�‘Cooked�", "authorNames": ["‘Processed�‘Cooked�"] }, { - "githubId": "(codeeong)", + "gitId": "(codeeong)", "displayName": "(codeeong)", "authorNames": ["(codeeong)"] }, { - "githubId": "^:jordancjq;$", + "gitId": "^:jordancjq;$", "displayName": "^:jordancjq;$", "authorNames": ["^:jordancjq;$"] } diff --git a/src/test/resources/StandaloneConfigTest/valid_config.json b/src/test/resources/StandaloneConfigTest/valid_config.json index 95179e14bb..9f73fbe5b9 100644 --- a/src/test/resources/StandaloneConfigTest/valid_config.json +++ b/src/test/resources/StandaloneConfigTest/valid_config.json @@ -4,25 +4,25 @@ "authors": [ { - "githubId": "lithiumlkid", + "gitId": "lithiumlkid", "displayName": "Ahm", "authorNames": ["Ahmad Syafiq"], "ignoreGlobList": ["*.aa1", "**.aa2", "**.java"] }, { - "githubId": "codeeong", + "gitId": "codeeong", "displayName": "Cod", "authorNames": ["Codee"], "ignoreGlobList": ["**[!(.md)]"] }, { - "githubId": "jordancjq", + "gitId": "jordancjq", "displayName": "Jor", "authorNames": ["Jordan Chong"], "ignoreGlobList": [""] }, { - "githubId": "lohtianwei", + "gitId": "lohtianwei", "displayName": "Loh", "authorNames": ["Tianwei"] }