atlantis icon indicating copy to clipboard operation
atlantis copied to clipboard

Option to use GitHub App's "Checks API" instead of PR comments

Open MPV opened this issue 4 years ago • 6 comments

Hi, I'd like to propose using the "GitHub Checks API" for delivering even nicer feedback into GitHub pull requests.

Here's two examples of how it looks when the Google Cloud Build GitHub app does this:

Success example:

ghgooglecloudbuild

Failure example:

2IPZt

Some possible benefits:

  1. It shows all runs in a collected list under the Checks tab. Compared to today, where Atlantis plan/applies are intermingled with discussions/changes to the PR. I imagine both could be valuable, and this condensed list could help in some cases.
  2. We could decide (or configure?) whether it should show the output from the Terraform commands directly in the PR, or just link to somewhere "safe" where the right people could access the output (and maybe help with issues like https://github.com/runatlantis/atlantis/issues/163).

Since the GitHub Checks API seems to require tying it to a GitHub app, I imagine it might mean each installation/usage of Atlantis might require the owners to set up their own private app, but that might be fine.

MPV avatar Feb 27 '20 14:02 MPV

Since this depends on atlantis being configured as a Github app, it seems to require https://github.com/runatlantis/atlantis/issues/418

pratikmallya avatar Feb 29 '20 23:02 pratikmallya

Now that #971 is completed (thanks @unRob !), any status on getting this implemented?

evanstachowiak avatar Mar 23 '21 11:03 evanstachowiak

This would put atlantis more on-par with competitors like Spacelift

https://docs.spacelift.io/integrations/source-control/github

nitrocode avatar Oct 06 '22 00:10 nitrocode

PRs will be welcome :)

jamengual avatar Oct 06 '22 03:10 jamengual

It appears the lyft fork has this setup and they previously attempted to upstream the changes here https://github.com/runatlantis/atlantis/pull/2217 but it fell into git conflicts and became stale.

If anyone is interested in taking the changes, fixing conflicts, testing, and opening up a new PR, then we can get it merged 😄 .

Notable in the lyft fork.

https://github.com/lyft/atlantis/blob/4c6dfb9739a84b7db10a8978023a6c8a13dff691/server/events/vcs/github_client.go#L515-L518

https://github.com/lyft/atlantis/blob/4c6dfb9739a84b7db10a8978023a6c8a13dff691/server/events/vcs/github_client.go#L545-L546

Edit: Using the checks api results in github app in a "job summary" (and "job summaries") style output (for issue searchers). It's also possible that a job summary output can be used with or without checks api meaning the github app is not 100% necessary for summaries.

nitrocode avatar Nov 23 '22 18:11 nitrocode

Would be nice to have this for Bitbucket cloud too

Almenon avatar Aug 20 '24 01:08 Almenon