Atlantis: Feature Request: Support customized Atlantis comment responses

Created on 6 Feb 2019  ยท  12Comments  ยท  Source: runatlantis/atlantis

We allow users to perform their own apply/merge on changes with Atlantis after code owner approval of a PR. The message from Atlantis is slightly unclear as to the order of operations which has led more than one user to merge a PR before running atlantis apply and requires that a "dummy" PR for the same commit be opened and then closed without merging to trick Atlantis in to running the apply. It would be really nice if either we could provide clarity on this in the standard auto-plan message or if Atlantis supported an easy way to customize auto-plan messages.

question

Most helpful comment

If #446 were implemented, an approach could be to prevent merging (using master branch protection) until after the apply status check has passed :grin:

All 12 comments

Maybe we can fix this in the existing comments since other users are probably having the same issues?

What were you thinking to make it clearer?

Actually, you know what would be really handy. A way to require atlantis apply before merging is permitted. I have a webhook setup to go to https://atlantis/events which passes if a plan or apply succeeds. If I could isolate the apply and require it for merging, that would also work.

To answer your question:
The existing message is

โฉ To apply all unapplied plans from this pull request, comment:
atlantis apply

Maybe something like this?

โฉ To apply all unapplied plans from this pull request, comment:
atlantis apply
This must be run before merging

image

How's that?

Also, you might be interested in the upcoming automerge feature: https://github.com/runatlantis/atlantis/pull/457

If #446 were implemented, an approach could be to prevent merging (using master branch protection) until after the apply status check has passed :grin:

If either #446 or #457 are implemented, I don't see a need for the note about apply before merge as one could prevent premature merging with branch protection.

If either #446 or #457 are implemented, I don't see a need for the note about apply before merge as one could prevent premature merging with branch protection.

Even with automerge (which is now implemented), users could still merge the pull request before the apply is run. #446 would be the best solution.

https://github.com/runatlantis/atlantis/pull/514 splits webhooks between plan and apply. I'll leave it up to @lkysow if this issue should still remain open but https://github.com/runatlantis/atlantis/pull/514 resolves my particular reasoning for custom messages.

It might still be nice to allow the output of scripts run in custom workflows to be part of Atlantis comments but I'm not sure I know how this would be done without just allowing stdout to flow through to the PR comment (which could be ugly).

It might still be nice to allow the output of scripts run in custom workflows to be part of Atlantis comments but I'm not sure I know how this would be done without just allowing stdout to flow through to the PR comment (which could be ugly).

Custom scripts output does show up in the comments.

Sounds like this issue can be resolved then. Thanks for all the work!

If this ticket was closed b/c #514 was merged, I'm pretty sure that it isn't resolved, see #523

Well this request is originally for "Feature Request: Support customized Atlantis comment responses" so none of those tickets is really related. But if k4k doesn't need this feature anymore then I don't think it's a problem that the issue is closed.

atlantis apply

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gaahrdner picture gaahrdner  ยท  3Comments

richstokes picture richstokes  ยท  3Comments

majormoses picture majormoses  ยท  3Comments

lkysow picture lkysow  ยท  6Comments

kipkoan picture kipkoan  ยท  3Comments