in src/main/java/org/apache/jenkins/gitpubsub/ASFGitSCMFileSystem.java [657:668]
public String getDefaultTarget(@NonNull String remote, StandardCredentials credentials)
throws IOException, InterruptedException {
String commitUrl = buildTemplateWithRemote("{+server}{?p}{;a}", remote)
.set("a", "heads")
.expand();
Document doc = fetchDocument(commitUrl);
Elements elements = doc.select("table.heads tr td.current_head a.name");
if (elements.size() > 0) {
return Constants.R_HEADS + elements.get(0).text();
}
return null;
}