Skip to content
Permalink
Browse files

18: The fetch command in RFR emails does not work

Reviewed-by: ehelin
  • Loading branch information
Robin Westberg
Robin Westberg committed Jul 2, 2019
1 parent 81550df commit fcbae4364a03b0753cee08cc2947b6c2f563c726
@@ -70,7 +70,7 @@ String diffUrl() {
String fetchCommand() {
var repoUrl = pr.repository().getUrl();
return "git fetch " + repoUrl.getScheme() + "://" + repoUrl.getHost() + repoUrl.getPath() + " " +
headHash().abbreviate() + ":pr/" + pr.getId();
pr.getSourceRef() + ":pull/" + pr.getId();
}

@FunctionalInterface
@@ -179,7 +179,7 @@ public Hash getHeadHash() {

@Override
public String getSourceRef() {
return json.get("head").get("ref").asString();
return "pull/" + getId() + "/head";
}

@Override
@@ -232,7 +232,7 @@ public Hash getHeadHash() {

@Override
public String getSourceRef() {
return json.get("source_branch").asString();
return "merge-requests/" + getId() + "/head";
}

@Override

0 comments on commit fcbae43

Please sign in to comment.
You can’t perform that action at this time.