diff --git a/src/main/java/io/quarkus/bot/release/ReleaseInformation.java b/src/main/java/io/quarkus/bot/release/ReleaseInformation.java index 9afd764..679e6a4 100644 --- a/src/main/java/io/quarkus/bot/release/ReleaseInformation.java +++ b/src/main/java/io/quarkus/bot/release/ReleaseInformation.java @@ -34,6 +34,9 @@ public String getVersion() { return version; } + /** + * @return the version appended with " LTS" if this is an LTS release, the version otherwise + */ @JsonIgnore public String getFullVersion() { if (Branches.isLts(branch)) { @@ -47,6 +50,9 @@ public String getBranch() { return branch; } + /** + * @return the branch appended with " LTS" if this is an LTS release, the branch otherwise + */ @JsonIgnore public String getFullBranch() { if (Branches.isLts(branch)) { @@ -56,14 +62,24 @@ public String getFullBranch() { return branch; } + /** + * @return the branch from which we branched - it is main except when preparing the CR1 of an LTS release, in which case it + * is the previous version branch as we want to branch from the previous version branch + */ public String getOriginBranch() { return originBranch; } + /** + * @return the qualifier (Alpha1, CR1, CR2...) + */ public String getQualifier() { return qualifier; } + /** + * @return whether it's a maintenance release, meaning it's not the current branch we are releasing + */ public boolean isMaintenance() { return maintenance; } @@ -79,20 +95,34 @@ public boolean isComplete() { return version != null; } + /** + * @return whether this version is the first final of a given branch, it will be .0 in most cases but can be .1 if we didn't + * release the .0 Platform (which happens when we find a critical bug in the core release between the initial .0 + * release and the full Platform release) + */ public boolean isFirstFinal() { return firstFinal; } + /** + * @return whether this version is a final release (e.g. not an alpha or a CR) + */ @JsonIgnore public boolean isFinal() { return qualifier == null || qualifier.isBlank() || qualifier.equals("Final"); } + /** + * @return whether this version is a candidate release + */ @JsonIgnore public boolean isCR() { return qualifier != null && qualifier.startsWith("CR"); } + /** + * @return whether this version is the .0. Be careful, it doesn't mean it's the first final (see {@link #isFirstFinal()}). + */ @JsonIgnore public boolean isDot0() { if (version == null) { @@ -102,20 +132,33 @@ public boolean isDot0() { return Versions.isDot0(version); } + /** + * @return whether this version is the CR1 + */ @JsonIgnore public boolean isFirstCR() { return "CR1".equalsIgnoreCase(qualifier); } + /** + * @return whether this is a major new release (e.g. 4.0.0.CR1) + */ public boolean isMajor() { return major; } + /** + * @return whether the origin branch is the main branch (which is the default, should only be false when release the CR1 of a new LTS) + */ @JsonIgnore public boolean isOriginBranchMain() { return Branches.MAIN.equals(originBranch); } + /** + * @return whether this version is an LTS maintenance release with the regular release cadence (so a release from a LTS + * branch, not a first final, and post 3.15 included) + */ @JsonIgnore public boolean isLtsMaintenanceReleaseWithRegularReleaseCadence() { if (version == null) {