Expose Pull Request comments as environment variables - similar to the git infos

The end goal we would like to achieve is to send a notification email that has a link to install the app and the comments that have been included from merging a pull request. The reason being is that we would like the person responsible for testing new builds to have everything in one location. We don’t want to send one email with the install link and another listing what changed in this release.

The Deploy to Bitrise IO step has a default notification email option, but it does not satisfy our requirements. I thought I solved this issue by using a Script step combined with Mailgun step to create my own custom email notification. To my dismay I found out I was not including the pull request comments, but rather the Github commit message.

I was hoping that there would already be a mechanism in Bitrise for achieving this, but as far as I’m aware, Bitrise does not create an environment that contains the pull request comments. So, I’m looking to roll my own using the Github Developer API. I plan on including these calls in my existing Script step and saving them with envman so that they persist to my other steps.

Hi @frankpiva,

Thanks for the Feature Requests! :wink:

Right now that’s the best solution.
If you have the time feel free to create a Step for it - you can now use the new

bitrise :step create

step generator, which is built into the latest Bitrise CLI (1.6.1 - Monthly release of Bitrise CLI tools and summary of updates (May, 2017) - CLI v1.6.1).

Indeed only commit/git infos are exposed. That’s because comments on PRs are 1) GitHub API specific (won’t work with another git service, have to be implemented for each, separately) and 2) comments are not attached to the state of the repository. E.g. it might be that the build is already started but someone adds a new comment to the PR.