Automatic PR comment


#1

buildkite-agent annotate is a great feature when you want to present output that should stand out for a build. I think it’s particular useful when there is a myriad of log output for a build, but really only a subset is that most important thing to present to an end-user.

I have a few usecases where I’d like to run analysis of source code and I would like to make a comment in the pull request to force the developers to notice it. Using buildkite-agent annotate is not enough as developers mostly are looking at the the Buildkite builds only when they are failing. https://codecov.io does this and we’ve been very useful with that service.

To be able to do above today, I need to create my own Github API key (or app), configure a secret environment variable for it in Buildkite, and then have some script which makes the comment (likely based on BUILDKITE_PULL_REQUEST).

Now to my idea: How about introducing buildkite-agent comment which, similarly to buildkite-agent annotate, would post a comment to Github. If Buildkite is made a public Github app (instead of manually registering webhooks on a repo) I think it might be given write-access to a repository’s issues and not just read access.

I’d say there is a trend where Github bots are communicating in pull requests and we’ve found it very useful.

I’d love to hear what you think.