I have a Jenkins instance, with credentials for a "robot" github account, which we use to interact with the GitHub API as a team. Typically, jobs are defined as declarative pipelines. I am looking for the correct syntax to perform the following steps:
- At the start of the run, create a review
- At the end of each stage, post a review comment, with the status of the stage, e.g. "build passed".
- If all of the stages pass, approve the pull request.
I can allow scripted steps, but the pipeline as a whole should be declarative. No shared libraries, and preferably only using commonly-used plugins.
(update with what I have tried)
I have tried using the pipeline github plugin's review method:
naively, but this throws errors.
What would be the correct syntax here?