Skip to content

Commit

Permalink
Add 8.0.z stream.
Browse files Browse the repository at this point in the history
  • Loading branch information
soul2zimate committed Jul 26, 2023
1 parent 6d418c6 commit 57b4580
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
16 changes: 11 additions & 5 deletions src/main/java/org/jboss/set/assist/CommitHomeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public class CommitHomeService {

private static final String FUTURE = "-future";
private static final String PROPOSED = "-proposed";
private static final String EAP_REPO = "jbossas/jboss-eap7";
private static final String EAP7_REPO = "jbossas/jboss-eap7";
private static final String EAP8_REPO = "jbossas/jboss-eap8";

private static final long MONTH_MILLI = 2629800000L; // milliseconds in a month

Expand Down Expand Up @@ -104,18 +105,23 @@ public int compare(Commit o1, Commit o2) {
}

private static boolean isEAP7PR(PullRequest pr) {
return pr.getURL().toString().contains(EAP_REPO) && pr.getCodebase().getName().startsWith("7.");
return pr.getURL().toString().contains(EAP7_REPO) && pr.getCodebase().getName().startsWith("7.");
}

private static boolean isEAP8PR(PullRequest pr) {
return pr.getURL().toString().contains(EAP8_REPO) && pr.getCodebase().getName().startsWith("8.");
}


/**
* Checks all commits (SHA or message) of the given PR against last commits from a work branch
* (only considers PRs submitted to a 7.<y>.x branch)
* (only considers PRs submitted to 7.<y>.x and 8.<y>.x branch)
*
* @param pullRequest
* @return false if PR is not submitted to 7.x or if one or more commits are missing in the work branches, true otherwise
* @return false if PR is not submitted to 7.x or 8.x or if one or more commits are missing in the work branches, true otherwise
*/
public static boolean isMergedInWorkBranch(PullRequest pullRequest) {
if (!isEAP7PR(pullRequest)) {
if (!(isEAP7PR(pullRequest) || isEAP8PR(pullRequest))) {
return false;
}

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/jboss/set/assist/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public class Constants {
public static final String WILDFLY_WILDFLY_CORE = "wildfly-wildfly-core";
public static final String JBOSSAS_WILDFLY_CORE_EAP = "jbossas-wildfly-core-eap";
public static final String JBOSSAS_JBOSS_EAP7 = "jbossas-jboss-eap7";
public static final String JBOSSAS_JBOSS_EAP8 = "jbossas-jboss-eap8";

public static final String JBOSSAS_JBOSS_EAP = "jbossas-jboss-eap";

public static final String GITHUB = "Github";
Expand Down Expand Up @@ -63,6 +65,7 @@ public class Constants {
public static final String EAP7_STREAM_TARGET_RELEASE_72ZGA = "7.2.z.GA";
public static final String EAP7_STREAM_TARGET_RELEASE_73ZGA = "7.3.z.GA";
public static final String EAP7_STREAM_TARGET_RELEASE_74ZGA = "7.4.z.GA";
public static final String EAP8_STREAM_TARGET_RELEASE_80ZGA = "8.0.z.GA";
public static final String EAP7_STREAM_TARGET_RELEASE_7BACKLOGGA = "7.backlog.GA";
// public static final String EAP7_STREAM_TARGET_RELEASE_710GA = "7.1.0.GA";
// public static final String EAP7_STREAM_TARGET_RELEASE_720GA = "7.2.0.GA";
Expand All @@ -74,6 +77,7 @@ public class Constants {
public static final String EAP72ZSTREAM = "jboss-eap-7.2.z";
public static final String EAP73ZSTREAM = "jboss-eap-7.3.z";
public static final String EAP74ZSTREAM = "jboss-eap-7.4.z";
public static final String EAP80ZSTREAM = "jboss-eap-8.0.z";

public static final ArrayList<String> EOLSTREAMS = new ArrayList<>(Arrays.asList(EAP63ZSTREAM, EAP70ZSTREAM, EAP71ZSTREAM));
public static final String WILDFLYSTREAM = "wildfly"; // ignored upstream in streams view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ private boolean checkStream(Stream currentStream, String targetRelease) {
return targetRelease.equals(Constants.EAP7_STREAM_TARGET_RELEASE_73ZGA);
} else if (currentStreamName.equals(Constants.EAP74ZSTREAM)) {
return targetRelease.equals(Constants.EAP7_STREAM_TARGET_RELEASE_74ZGA);
// } else if (currentStreamName.equals(Constants.EAP7Z0STREAM)) {
// return targetRelease.equals(Constants.EAP7_STREAM_TARGET_RELEASE_710GA);
} else if (currentStreamName.equals(Constants.EAP80ZSTREAM)) {
return targetRelease.equals(Constants.EAP8_STREAM_TARGET_RELEASE_80ZGA);
} else {
return false;
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/jboss/set/overview/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public static boolean filterComponent(StreamComponent component) {
|| name.equalsIgnoreCase(Constants.WILDFLY_WILDFLY_CORE)
|| name.equalsIgnoreCase(Constants.JBOSSAS_WILDFLY_CORE_EAP)
|| name.equalsIgnoreCase(Constants.JBOSSAS_JBOSS_EAP7)
|| name.equalsIgnoreCase(Constants.JBOSSAS_JBOSS_EAP8)
|| name.equalsIgnoreCase(Constants.JBOSSAS_JBOSS_EAP);
}

Expand Down

0 comments on commit 57b4580

Please sign in to comment.