Skip to content
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

[#2280] Specify time periods for different repos in csv config #2281

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

CYX22222003
Copy link
Contributor

@CYX22222003 CYX22222003 commented Feb 3, 2025

Fix #2280

Proposed commit message

Specify time periods for different repos in csv config

This is to address the request to allow different periods for different
repos. 

Let's update the methods of parsing csv file and updating analysis
dates of repo configuration in the backend.

Other information

Sample CSV

Repository's Location,Branch,File formats,Ignore Glob List,Ignore standalone config,Ignore Commits List,Ignore Authors List,Shallow Cloning,Find Previous Authors,since,until
https://github.com/Golddirio/HacknRoll2025.git,main,,,,,,,,17/01/2025,19/01/2025

New format of summary.json

{
  "repoSenseVersion": "de62a593c5",
  "reportGeneratedTime": "周一, 10 2月 2025 21:53:52 SGT",
  "reportGenerationTime": " 16.18 second(s)",
  "zoneId": "Asia/Singapore",
  "reportTitle": "RepoSense Report",
  "repos": [
    {
      "location": {
        "location": "https://github.com/reposense/testrepo-Alpha.git",
        "repoName": "testrepo-Alpha",
        "organization": "reposense",
        "domainName": "github"
      },
      "branch": "master",
      "displayName": "reposense/testrepo-Alpha[master]",
      "outputFolderName": "reposense_testrepo-Alpha_master",
      "sinceDate": "2025-01-10",
      "untilDate": "2025-02-10"
    }
  ]
  ...
}

Related issue: #2283

@github-actions github-actions bot requested a deployment to dashboard-2281 February 3, 2025 05:40 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 3, 2025 05:40 Abandoned
@github-actions github-actions bot requested a deployment to dashboard-2281 February 3, 2025 06:07 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 3, 2025 06:07 Abandoned
@github-actions github-actions bot requested a deployment to dashboard-2281 February 3, 2025 06:32 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 3, 2025 06:32 Abandoned
@github-actions github-actions bot requested a deployment to dashboard-2281 February 3, 2025 13:49 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 3, 2025 13:49 Abandoned
@github-actions github-actions bot requested a deployment to dashboard-2281 February 3, 2025 13:59 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 3, 2025 13:59 Abandoned
@github-actions github-actions bot requested a deployment to dashboard-2281 February 15, 2025 07:49 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 15, 2025 07:49 Abandoned
Copy link
Contributor

@Airiinnn Airiinnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the backend changes!

Left some minor nits regarding naming.

Also, I think tests for the changes in RepoConfiguration may be missing? Would be good to ascertain default values if hasUpdatedSinceDateInConfig and hasUpdatedUntilDateInConfig are false, and if the commits are filtered correctly according to the individual repo's date ranges.

Should update docs for the new fields too.

src/main/java/reposense/parser/RepoConfigCsvParser.java Outdated Show resolved Hide resolved
src/main/java/reposense/parser/RepoConfigCsvParser.java Outdated Show resolved Hide resolved
@Airiinnn
Copy link
Contributor

Just thought of another thing, is sinceDate and untilDate in summary.json guaranteed to be the min and max of all the repos' sinceDate and untilDate?

@github-actions github-actions bot requested a deployment to dashboard-2281 February 17, 2025 05:45 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 17, 2025 05:45 Abandoned
@CYX22222003
Copy link
Contributor Author

Just thought of another thing, is sinceDate and untilDate in summary.json guaranteed to be the min and max of all the repos' sinceDate and untilDate?

I will add additional steps to impose this constraint.

@github-actions github-actions bot requested a deployment to dashboard-2281 February 17, 2025 05:52 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 17, 2025 05:52 Abandoned
@Airiinnn
Copy link
Contributor

Airiinnn commented Feb 17, 2025

Just thought of another thing, is sinceDate and untilDate in summary.json guaranteed to be the min and max of all the repos' sinceDate and untilDate?

I will add additional steps to impose this constraint.

Wait I was just asking if that is a constraint, not sure if it's supposed to be one.

I was mainly wondering what would be the intended behavior if --since & --until CLI flags are provided and are before and after the min and max of all repos' sinceDate and untilDate respectively. Is allowing this necessary for anything? Can't think of anything atm.

If allowed, will the commits in commits.json still only be limited to the individual repo's sinceDate and untilDate?

@CYX22222003
Copy link
Contributor Author

CYX22222003 commented Feb 17, 2025

Sorry for the oversight. I think the commit.json will still follow the individual repo's sinceDate and untilDate. But currently the frontend may not display in the correct way.

@Airiinnn
Copy link
Contributor

Sorry for the oversight. I think the commit.json will still follow the individual repo's sinceDate and untilDate. But currently the frontend may not display in the correct way.

Alright gotcha, thanks! I'll make the frontend changes according to this then.

@github-actions github-actions bot requested a deployment to dashboard-2281 February 17, 2025 08:53 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 17, 2025 08:53 Abandoned
@github-actions github-actions bot requested a deployment to dashboard-2281 February 17, 2025 08:58 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 17, 2025 08:58 Abandoned
@github-actions github-actions bot requested a deployment to dashboard-2281 February 17, 2025 09:02 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 17, 2025 09:02 Abandoned
@github-actions github-actions bot requested a deployment to dashboard-2281 February 17, 2025 09:36 Abandoned
@github-actions github-actions bot requested a deployment to docs-2281 February 17, 2025 09:36 Abandoned
@CYX22222003 CYX22222003 requested review from Airiinnn and a team February 17, 2025 09:47
Copy link
Contributor

@Airiinnn Airiinnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you may need to update the UG docs (docs/ug/configFiles.md) as well.

But other than that, LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Specify different time periods for different repos (backend)
3 participants