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 the basic structure and some first rules for InnerSource repo lin… #924

Closed
wants to merge 7 commits into from
Closed

Add the basic structure and some first rules for InnerSource repo lin… #924

wants to merge 7 commits into from

Conversation

ihrigb
Copy link
Member

@ihrigb ihrigb commented Feb 23, 2023

…ting.

@cla-assistant
Copy link

cla-assistant bot commented Feb 23, 2023

CLA assistant check
All committers have signed the CLA.

@sourabhsparkala
Copy link
Member

sourabhsparkala commented Mar 9, 2023

Overall, the changes look good.

I have left few comments on what you could use

  • Java Docs update on members, methods, classes
  • Also we use Google-checkstyle https://google.github.io/styleguide/javaguide.html for formatting
  • LOGs where necessary
  • Also the Formatters have user-defined report-related contents, please use that
  • Please create an issue to address this PR, we always associate every commit to the resolvement of an associated issue # and please associate it to a milestone
  • Looking forward to more commits.

Apologies for taking time to review this. Also, we can try in parallel to set this up, how OSS Rules-of-play generate reports
via fosstars-rating-action in the future https://github.com/SAP/fosstars-rating-core/blob/master/.github/workflows/fosstars-rop-report.yml

@ihrigb
Copy link
Member Author

ihrigb commented Mar 17, 2023

Issue: #931

@ihrigb
Copy link
Member Author

ihrigb commented Apr 3, 2023

@sourabhsparkala as I updated everything already: any updates to this?

@ihrigb ihrigb marked this pull request as ready for review April 3, 2023 07:22
@sourabhsparkala
Copy link
Member

@ihrigb I will look into this. In the mean time, there seems to be checkstyle issues, could you please address them?

Thanks
Sourabh

Comment on lines +37 to +45
Optional<String> topicOptional = fetcher.githubTopicsFor(project).stream().filter(topic -> {
return ACCEPTED_TOPICS.contains(topic.toLowerCase(Locale.US));
}).findFirst();

if (topicOptional.isPresent()) {
return HAS_INNERSOURCE_TOPIC.value(true);
}
return HAS_INNERSOURCE_TOPIC.value(false)
.explain("The repository does not have an InnerSource topic.");
Copy link
Member

@sourabhsparkala sourabhsparkala Apr 3, 2023

Choose a reason for hiding this comment

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

Suggested change
Optional<String> topicOptional = fetcher.githubTopicsFor(project).stream().filter(topic -> {
return ACCEPTED_TOPICS.contains(topic.toLowerCase(Locale.US));
}).findFirst();
if (topicOptional.isPresent()) {
return HAS_INNERSOURCE_TOPIC.value(true);
}
return HAS_INNERSOURCE_TOPIC.value(false)
.explain("The repository does not have an InnerSource topic.");
boolean hasAcceptedTopic = fetcher.githubTopicsFor(project)
.stream()
.anyMatch(topic -> ACCEPTED_TOPICS.contains(topic.toLowerCase(Locale.US)));
return HAS_INNERSOURCE_TOPIC.value(hasAcceptedTopic)
.explainIf(false, "The repository does not have an InnerSource topic.");

import java.util.Locale;
import java.util.Optional;
import java.util.Set;

Copy link
Member

Choose a reason for hiding this comment

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

import com.sap.oss.phosphor.fosstars.model.value.ScoreValue;
import java.util.Objects;

public class InnerSourceRulesOfPlayRating extends AbstractRating {
Copy link
Member

Choose a reason for hiding this comment

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

import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@sourabhsparkala sourabhsparkala left a comment

Choose a reason for hiding this comment

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

The changes look good. A few Java Docs are missing. Please note the below-required changes

@ihrigb ihrigb closed this Jul 31, 2023
@ihrigb ihrigb deleted the InnerSource branch July 31, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants