Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add silence_pr_comments on plan and apply #4543

Merged
merged 4 commits into from
Jun 1, 2024

Conversation

anryko
Copy link
Contributor

@anryko anryko commented May 13, 2024

what

A feature to allow silencing atlantis plan and atlantis apply on per repo/project basis. This is useful when running a big Atlantis server pool and/or having big repetitive changes. In those cases it could be preferable to rely on the GitHub status check and disable Atlantis comment responses.

why

I have a distributed Atlantis setup where a single PR change is planned by many isolated instances. In this setup, each of those instances will post a repetitive comment response to the GitHub thread. It would be preferable to have an option to control this behavior.

With this feature, it would be possible to add a server-side repo or atlantis.yaml project level config option of silence_pr_comments: ["plan", "apply"] and prevent Atlantis from posting the comment responses on those commands, while still reporting the status check updates.

tests

  • I ensured the existing tests do still work and added some new ones.
  • I tested my changes manually in the local test environment.

references

@anryko anryko requested review from a team as code owners May 13, 2024 17:30
@anryko anryko requested review from GenPage, lukemassa and X-Guardian and removed request for a team May 13, 2024 17:30
@github-actions github-actions bot added docs Documentation go Pull requests that update Go code labels May 13, 2024
@jamengual jamengual added the waiting-on-review Waiting for a review from a maintainer label May 14, 2024
chenrui333
chenrui333 previously approved these changes May 21, 2024
Copy link
Member

@chenrui333 chenrui333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chenrui333
Copy link
Member

@anryko can you pull the latest main and fix the conflicts? Thanks!

@anryko anryko force-pushed the feat_silence_pr_comments_1 branch 3 times, most recently from 434728f to 3c2e672 Compare May 22, 2024 10:26
@anryko
Copy link
Contributor Author

anryko commented May 22, 2024

@chenrui333 I rebased and retested the feature locally. Some GH checks are failing, but it seems to be a build system issue... Thank you for the review!

@anryko anryko force-pushed the feat_silence_pr_comments_1 branch from 3c2e672 to 1f15562 Compare May 22, 2024 15:23
@chenrui333 chenrui333 added feature New functionality/enhancement ready to merge labels May 29, 2024
@chenrui333 chenrui333 added this to the v0.29.0 milestone May 29, 2024
@chenrui333 chenrui333 merged commit 78373f6 into runatlantis:main Jun 1, 2024
28 checks passed
@chenrui333 chenrui333 removed the waiting-on-review Waiting for a review from a maintainer label Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation feature New functionality/enhancement go Pull requests that update Go code ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an option to disable github plan/apply/policy_check comments for a workflow
3 participants