New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
summary.json: move sinceDate and untilDate become direct element #607 #615
Conversation
@reposense/stage1-reviewers Ready for review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest looks good to me
@@ -38,8 +43,8 @@ | |||
} | |||
|
|||
/** | |||
* Parses the {@code gitLogResult} into a list of {@code CommitInfo} and returns it. | |||
*/ | |||
* Parses the {@code gitLogResult} into a list of {@code CommitInfo} and returns it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces are missing here.
@reposense/stage2-reviewers ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes requested
I believe the frontend portion also needs to be edited to take the |
No need because sinceDate and untilDate is not used so far (it is used in my other 2 PR) |
@reposense/stage2-reviewers ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 nit, rest LGTM
InputStream is = RepoSense.class.getResourceAsStream(TEMPLATE_FILE); | ||
FileUtil.copyTemplate(is, outputPath); | ||
|
||
cloneAndAnalyzeRepos(configs, outputPath); | ||
|
||
FileUtil.writeJsonFile(new SummaryReportJson(configs, generationDate), getSummaryResultPath(outputPath)); | ||
FileUtil.writeJsonFile(new SummaryReportJson( | ||
configs, generationDate, sinceDate, untilDate), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be put together on the line above right (without passing the 120 characters limit)?
@reposense/stage2-reviewers fixed last nit spotted by Jun An |
Its just a plain
What config are you using and which repo is showing difference? Need to be more specific. |
I am using the config in src/systemtest/resources/repo-config.csv and src/systemtest/resources/author-config.csv
The Why I am using that date? Because if we do not supply any date argument when running RepoSense, it will automatically analyze the repo, and by debuggin the app, the date range that I get for
It is the same file you pointed out. |
The questions I asked above is things that you should include and investigate when reporting a bug / error. Main problem is still that the new changes doesn't seems to be correct. If you think that there is an underlying problem, you will need to investigate and report it as an issue. |
@eugenepeh Running
It will get the git log, but it seems to get it on arbitrary date range. In the case of This behavior is what causing running So is this an intended design or a bug? |
It is meant to retrieve all the affected files in the given date range.
If this only cause an issue when a date range is issued, then most likely it is a bug.
Yes, please do investigate further. It will help you understand the back end architecture better if you haven't already. |
Because it will interfere with authorship report
@eugenepeh fixed and worked already. No bug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 minor nits
@@ -227,4 +238,16 @@ private static String getIndividualAuthorshipPath(String repoReportDirectory) { | |||
private static String getIndividualCommitsPath(String repoReportDirectory) { | |||
return repoReportDirectory + "/commits.json"; | |||
} | |||
|
|||
public static void setEarliestSinceDate(Date newEarliestSinceDate) { | |||
if (earliestSinceDate == null || earliestSinceDate.after(newEarliestSinceDate)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think normally when people look for the earliest date/object, they usually compare who comes before, instead of after, in multiple comparison context. To standardize with that convention, let's change it to use before
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eugenepeh done
@emer7 Do resolve the conflicts |
@yamidark resolved |
Slight nits to proposed message:
|
Fix #607
This PR will affect PR #596 and PR #539