Skip to content

Commit

Permalink
[ci/docsLink] hide link when 200 says "There aren't any differences!" (
Browse files Browse the repository at this point in the history
…#90079)

Co-authored-by: spalger <[email protected]>
  • Loading branch information
Spencer and spalger authored Feb 2, 2021
1 parent 240a7c3 commit 531194b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vars/githubPr.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 531194b

Please sign in to comment.