Last active
November 9, 2016 16:30
-
-
Save breskeby/5e39d5e820d505b583bc57f39f5e507f to your computer and use it in GitHub Desktop.
buildscan recipe gist for creating topic on gradle forum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildScan.buildFinished { result -> | |
if(result.failure){ | |
if(result.failure instanceof org.gradle.internal.exceptions.LocationAwareException){ | |
if(result.failure.reportableCauses.size() >= 1) { | |
def reportMessage = result.failure.reportableCauses[0].message | |
buildScan.link("Create Gradle Forum Topic", createForumLink(reportMessage)) | |
} | |
} | |
} | |
} | |
def createForumLink(reportMessage){ | |
def message = reportMessage.replace(' ', "%20") | |
return "http://discuss.gradle.org/new-topic?title=Build%20fails%20with%20%22${message}%22&body=put%20your%20build%20scan%20url%20here!&category=Help%2FDiscuss&tags=buildscan-provided" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment