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

Add ProjectDTO details API #1625

Merged
merged 13 commits into from
May 26, 2022

Conversation

swarajsaaj
Copy link
Contributor

@swarajsaaj swarajsaaj commented May 7, 2022

Adding API to read the details required for ProjectDTO
Partially fixes #1453

@codecov
Copy link

codecov bot commented May 7, 2022

Codecov Report

Merging #1625 (e5413a9) into main (1901d66) will not change coverage.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##                main     #1625   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity      1849      1874   +25     
===========================================
  Files            395       397    +2     
  Lines           6964      7023   +59     
  Branches         155       160    +5     
===========================================
+ Hits            6964      7023   +59     
Impacted Files Coverage Δ
...va/tech/jhipster/lite/common/domain/FileUtils.java 100.00% <100.00%> (ø)
...ildtool/generic/domain/BuildToolDomainService.java 100.00% <100.00%> (ø)
...r/buildtool/gradle/domain/GradleDomainService.java 100.00% <100.00%> (ø)
...tor/buildtool/maven/domain/MavenDomainService.java 100.00% <100.00%> (ø)
...or/packagemanager/npm/domain/NpmDomainService.java 100.00% <100.00%> (ø)
...project/application/ProjectApplicationService.java 100.00% <100.00%> (ø)
...generator/project/domain/ProjectDomainService.java 100.00% <100.00%> (ø)
...nfrastructure/config/ProjectBeanConfiguration.java 100.00% <100.00%> (ø)
...project/infrastructure/primary/dto/ProjectDTO.java 100.00% <100.00%> (ø)
...t/infrastructure/primary/rest/ProjectResource.java 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69b1b00...e5413a9. Read the comment docs.

@swarajsaaj swarajsaaj marked this pull request as ready for review May 7, 2022 20:15
Optional<String> line = readLine(filename, prefix);
Pattern pattern = Pattern.compile(prefix + REGEXP_DOT_PLUS_MIN + suffix, Pattern.DOTALL);
if (line.isPresent()) {
Matcher matcher = pattern.matcher(line.get());
Copy link
Contributor

Choose a reason for hiding this comment

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

You can maybe extract the first if statement into a method like Function <String, Optional<String>> getValueFromLine() and call it into a map from line like line.map(this::getValueFromLine).orElse(Optional.empty()).
It avoids to have an if statement in another one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for review @seraphinandrieux . I went with a different method for future reusability.

@pascalgrimaud
Copy link
Member

@swarajsaaj : sorry, can you solve the conflict plz?

@swarajsaaj swarajsaaj force-pushed the feature/project_dto_api branch from 4a4fec9 to af705b5 Compare May 18, 2022 18:09
@swarajsaaj
Copy link
Contributor Author

@swarajsaaj : sorry, can you solve the conflict plz?

Done @pascalgrimaud

@pascalgrimaud pascalgrimaud merged commit e15ba93 into jhipster:main May 26, 2022
@pascalgrimaud
Copy link
Member

Thanks for your work here @swarajsaaj :-)))

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.

Extract ProjectDTO from a folder
3 participants