From 1f0ecfbfc1683a23c057565c7ab3636a54e091ba Mon Sep 17 00:00:00 2001 From: Spencer Date: Tue, 2 Feb 2021 17:28:00 -0700 Subject: [PATCH] [7.x] [ci/docsLink] hide link when 200 says "There aren't any differences!" (#90079) (#90100) Co-authored-by: spalger Co-authored-by: spalger --- vars/githubPr.groovy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vars/githubPr.groovy b/vars/githubPr.groovy index 5224aa7463d7..eead00c082ba 100644 --- a/vars/githubPr.groovy +++ b/vars/githubPr.groovy @@ -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}"