Skip to content

Commit

Permalink
Merge branch 'master' into implement-one-stop-config-file
Browse files Browse the repository at this point in the history
  • Loading branch information
georgetayqy authored Aug 9, 2024
2 parents 42d167d + 3b54a9c commit 3e0d06b
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 63 deletions.
2 changes: 1 addition & 1 deletion docs/dg/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Our workflow is mostly based on the guidelines given at se-education.org/guides.

## Find the suitable pull requests

* If you are contributing to RepoSense for the first time, you can check the list of [backend issues](https://github.com/reposense/RepoSense/issues?q=is%3Aopen+is%3Aissue+label%3Aa-Backend+label%3Ad.FirstTimers) or [frontend issues](https://github.com/reposense/RepoSense/issues?q=is%3Aopen+is%3Aissue+label%3Ad.FirstTimers+label%3Aa-FrontEnd) for first timers.
* If you are contributing to RepoSense for the first time, you can check the list of [issues that are suitable for first timers](https://github.com/reposense/RepoSense/issues?q=is%3Aopen+is%3Aissue+label%3Ad.FirstTimers).

<box type="info" seamless>

Expand Down
6 changes: 3 additions & 3 deletions docs/ug/authorConfigSyntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ To list out one or more branches for a particular `Repository's Location`, we ca

Below is an example:

| Repository's Location | Branch | Author's Git Host ID | ... Hidden columns |
|------------------------------------------------------------------------|----------|----------------------|-----------------------|
| `https://github.com/reposense/RepoSense.git~master\|release\|cypress` | master | sikai00 | -- |
| Repository's Location | Branch | Author's Git Host ID | ... Hidden columns |
|------------------------------------------------------------------------|----------|----------------------|--------------------|
| `https://github.com/reposense/RepoSense.git~master\|release\|cypress` | | sikai00 | -- |

We have now provided author details for three different branches in a single repo, using a single row.

Expand Down
98 changes: 64 additions & 34 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"minimatch": "^9.0.0",
"muicss": "^0.10.3",
"normalize.css": "^8.0.1",
"postcss": "^8.4.38",
"postcss": "^8.4.39",
"pug-lint-vue": "^0.4.0",
"seedrandom": "^3.0.5",
"vue": "~3.4.0",
Expand All @@ -56,7 +56,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-vue": "^9.0.0",
"postcss-html": "^1.6.0",
"pug": "^3.0.2",
"pug": "^3.0.3",
"pug-plain-loader": "^1.1.0",
"sass": "^1.71.0",
"sass-loader": "^14.0.0",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/panels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import 'z-indices';

.panel-padding {
padding: 2rem 1.5rem 2rem 2.2rem;
padding: 0 1.5rem 2rem 2.2rem;
}

#app-wrapper {
Expand Down
17 changes: 9 additions & 8 deletions frontend/src/views/c-authorship.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<template lang="pug">
#authorship
.panel-title
span Code Panel
.toolbar--multiline
a(
v-if="activeFilesCount < selectedFiles.length",
v-on:click="toggleAllFileActiveProperty(true)"
) show all file details
a(v-if="activeFilesCount > 0", v-on:click="toggleAllFileActiveProperty(false)") hide all file details
h2
.panel-title
span Code Panel
.toolbar--multiline
a(
v-if="activeFilesCount < selectedFiles.length",
v-on:click="toggleAllFileActiveProperty(true)"
) show all file details
a(v-if="activeFilesCount > 0", v-on:click="toggleAllFileActiveProperty(false)") hide all file details
.panel-heading
a.group-name(
v-bind:href="info.location", target="_blank",
Expand Down
23 changes: 12 additions & 11 deletions frontend/src/views/c-zoom.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<template lang="pug">
#zoom(v-if="filteredUser")
.panel-title
span Commits Panel
.toolbar--multiline(v-if="filteredUser.commits.length && totalCommitMessageBodyCount")
a(
v-if="expandedCommitMessagesCount < totalCommitMessageBodyCount",
v-on:click="toggleAllCommitMessagesBody(true); toggleDiffstatView(true);"
) show all commit details
a(
v-if="expandedCommitMessagesCount > 0",
v-on:click="toggleAllCommitMessagesBody(false); toggleDiffstatView(false);"
) hide all commit details
h2
.panel-title
span Commits Panel
.toolbar--multiline(v-if="filteredUser.commits.length && totalCommitMessageBodyCount")
a(
v-if="expandedCommitMessagesCount < totalCommitMessageBodyCount",
v-on:click="toggleAllCommitMessagesBody(true); toggleDiffstatView(true);"
) show all commit details
a(
v-if="expandedCommitMessagesCount > 0",
v-on:click="toggleAllCommitMessagesBody(false); toggleDiffstatView(false);"
) hide all commit details
.panel-heading
.group-name
span(
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/reposense/RepoSense.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
public class RepoSense {
private static final Logger logger = LogsManager.getLogger(RepoSense.class);
private static final int SERVER_PORT_NUMBER = 9000;
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("E MMM d HH:mm:ss yyyy z");
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("E, d MMM yyyy HH:mm:ss z");
private static final String VERSION_UNSPECIFIED = "unspecified";

/**
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/reposense/parser/BlurbMarkdownParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ public BlurbMap parse() throws IOException, InvalidMarkdownException {
// extract the url record first
// this is guaranteed to be in the first line or else we fail
UrlRecord urlRecord = this.getUrlRecord(mdLines, counter);
// if delimiter is the last non-blank line, null is returned
if (urlRecord == null) {
break;
}
url = urlRecord.getUrl();
counter = urlRecord.getNextPosition();

Expand Down Expand Up @@ -120,9 +124,17 @@ private UrlRecord getUrlRecord(List<String> lines, int position) throws InvalidM
// checks if url is valid
// adapted from https://www.baeldung.com/java-validate-url
try {
String url = lines.get(position).strip();
String url = "";
// skips blank lines
while (url.length() == 0) {
// checks if delimiter is the last non-blank line
if (position >= lines.size()) {
return null;
}
url = lines.get(position++).strip();
}
new URL(url).toURI();
return new UrlRecord(lines.get(position), position + 1);
return new UrlRecord(url, position);
} catch (MalformedURLException | URISyntaxException ex) {
throw new InvalidMarkdownException("URL provided is not valid!");
}
Expand Down
Loading

0 comments on commit 3e0d06b

Please sign in to comment.