Expose GitHub Webhook Events, and Status Message API

Currently, CircleCI has the ability to build an app on the creation of a PR from a GitHub, and, as part of the build, can be directed to execute scripting that deploy builds to some platform service, like AWS.

However, there doesn’t seem to be a way to execute scripts when a PR is merged/closed. It would be incredibly useful if CircleCI could expose that (and perhaps other) webhook(s), and allow for, scripting to run after a PR branch has been closed/merged, for example to clean up a temporary deploy to a platform, such as AWS.

By way of example of the feature set I’m describing, here’s a link to Heroku’s Review Apps feature. Certainly it’s true that Heroku has a different business domain, where they are a fully fledged platform, however the feature hinges on GitHub API, for which there could be many pipeline related use cases, making it more relevant to CircleCI.

To better illustrate the virtues of the use case I am eager to solve, temporary PR deploys are valuable in order to manually confirm PR change-sets, especially where QA of frontend applications is concerned: “Does this style change work responsively?” “How does it affect “x” feature, under “y” circumstances?”

One peripheral aspect of this would be messaging a status back to the PR, with a link to the deploy. I can appreciate that the latitudes for this are something that would represent another feature enhancement to the CircleCI API, of a similar magnitude.

Realted feature requests, both about exposing GitHub webhooks / custom status messages generally, and about merge actions specifically are pretty numerouse accross the CircleCI Discuss forum. I think there’s also an argument to be made to enrich integrations with services (klike AWS and GitHub) that represent a dominant market share in their respective domains. This all amounts to a compelling argument that there is demand for this feature-set, and that it relates to a multitude of use cases. Hope you’ll consider it!

Many thanks for your continued committment to the community, and for the really awesome product!

  • Guest
  • Jan 23 2018
  • Taking votes
  • Attach files
  • Jeff Maher commented
    December 12, 2018 17:57

    I couldn't state the need or use case (review environments) any better than the above comment. The only thing to add is that the lack of exposure to GitHub webhooks and/or the ability to see/parse the webhook payload has driven one of my clients to move to a competing product that does expose these things (in this case CodeFresh).

  • Cassidy Bridges commented
    December 19, 2018 20:09

    +1 For this, We'd really like to use a feature like this to incorporate spinning down environments spun up by circle ci.

  • Asif Iqbal commented
    January 07, 2019 10:22

    +1 def could do with this.

  • Owen Matsuda commented
    July 29, 2019 18:59

    +1

  • amaury ravanel commented
    August 22, 2019 12:29

    +1

  • Jimmy Shimizu commented
    September 04, 2019 06:59

    Came here for the same reason, I want to tear down infrastructure related to a PR demo, without manually doing it. CircleCI is already acting on deleted branched/PRs for other purposes, would be nice if it could be used as a trigger.

  • Andrej Novikov commented
    September 16, 2019 09:57

    This is a necessity and a current blocker for me in using circle.

  • Daniel Whitston commented
    December 24, 2019 11:57

    We're planning to move to per-branch builds, and the ability to tear down those builds when the branch gets deleted is vital. We may implement this with a separate GitHub hook to an AWS lambda as a workaround, but it's an indicator that maybe CircleCI isn't something we should be using for deployment.

  • Lauren Biggers commented
    December 26, 2019 20:37

    It would be nice to turn off expensive tests on GitHub Draft Pull Requests.