Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,17 @@ public final void perform(final Run<?, ?> build, FilePath workspace, final Launc
throw new AbortException();
}

final String buildUrl = environment.get("BUILD_URL");
String whichBuildUrl;

if (getDescriptor().getIsBlueOceanEnabled()) {
whichBuildUrl = environment.get("RUN_DISPLAY_URL");
}
else {
whichBuildUrl = environment.get("BUILD_URL");
}

// Still do finalization to prevent manipulation
final String buildUrl = whichBuildUrl;

if (!isDifferential) {
// Process harbormaster for non-differential builds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
public final class PhabricatorNotifierDescriptor extends BuildStepDescriptor<Publisher> {
private String credentialsID;
private String uberallsURL;
private boolean isBlueOceanEnabled;

public PhabricatorNotifierDescriptor() {
super(PhabricatorNotifier.class);
Expand Down Expand Up @@ -103,4 +104,12 @@ public String getUberallsURL() {
public void setUberallsURL(String value) {
uberallsURL = value;
}

public boolean getIsBlueOceanEnabled() {
return isBlueOceanEnabled;
}

public void setIsBlueOceanEnabled(boolean value) {
isBlueOceanEnabled = value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
description="Location of the Uberalls instance">
<f:textbox />
</f:entry>
<f:entry title="Blue Ocean URI's" field="isBlueOceanEnabled"
description="Make use of Blue Ocean URI's in notifications posted to Phabricator">
<f:checkbox default="false" />
</f:entry>
</f:optionalBlock>
</f:section>
</j:jelly>