I have a Jenkins pipeline that runs a groovy script. One of the steps is to issue an HTTP POST request to GitHub.
It looks something like this
def gitHubRe