I am wondering if there is already a way to update a Github (Enterprise) pull request with a comment within the Jenkins Pipeline syntax. I have it already updating it with the build status of success or failed automatically but I also want to post a comment with the test results and code coverage or the reason why the build failed. Before I start to write my own function in groovy calling the REST API of github to do this I wanted to make sure there wasn't already an easier way say like a plugin that had this function.
Check first if the "Adding a comment" section of the jenkinsci/pipeline-github-plugin would work for you:
def comment = pullRequest.comment('This PR is highly illogical..')