runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.64k stars 1.04k forks source link

Disable "run" as a comment keyword to trigger atlantis #375

Open maxblaze opened 5 years ago

maxblaze commented 5 years ago

Is there a way to turn off the interception of the custom run commands? We're already using run foo for another service integrated with GitHub and Atlantis is spamming a message that the command isn't found.

lkysow commented 5 years ago

It would require a code change and would break backwards compatibility. What other service is using the "run" keyword (for my knowledge). Is it possible to change that service?

To be clear, I'm not 100% against this because all the docs tell people to use atlantis.

maxblaze commented 5 years ago

So one thing that might work--is it possible to configure a global run command that does nothing using the existing configs?

We can change our command, it just caught us off-guard because it wasn't clearly documented =)

lkysow commented 5 years ago
lkysow commented 5 years ago

I want to reach out to some users to see if they're using that command. That might take a while so I don't think this will be implemented super soon.

In that time you could either fork the repo, delete the run word from this line: https://github.com/runatlantis/atlantis/blob/master/server/events/comment_parser.go#L124 and compile and run it or you could maybe change your command.

gkze commented 4 years ago

@lkysow would you be open to a PR that adds an option to disable this keyword for those of us who already have other systems trigger on it? It can stay on by default to remain backwards compatible.

lkysow commented 4 years ago

We could add a flag --trigger-word?

gkze commented 4 years ago

I was just creating a PR implementing --disable-run-trigger-keyword, but if you think a more general configuration setting is suitable, I'd be happy to change it to that with a default value of []string{"atlantis", "run"}. We could then append the VCS user inside CommentParser.Parse(...) (we'd add trigger keywords as a struct field on CommentParser), so the functionality would remain the same.

lkysow commented 4 years ago

Sounds good!