[ci/docsLink] hide link when 200 says "There aren't any differences!" (#90079)

Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
Spencer 2021-02-02 15:21:19 -07:00 committed by GitHub
parent 240a7c3f02
commit 531194baba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -300,7 +300,12 @@ def getDocsChangesLink() {
try {
// httpRequest throws on status codes >400 and failures
httpRequest([ method: "GET", url: url ])
def resp = httpRequest([ method: "GET", url: url ])
if (resp.contains("There aren't any differences!")) {
return ""
}
return "* [Documentation Changes](${url})"
} catch (ex) {
print "Failed to reach ${url}"