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

Add an option to refuse to checkout PRs greater than --checkout-depth #5074

Open
1 task done
DerekTBrown opened this issue Nov 7, 2024 · 0 comments
Open
1 task done
Labels
feature New functionality/enhancement

Comments

@DerekTBrown
Copy link


Describe the user story

  • As the operator of an Atlantis deployment, I want the option to prevent users from planning/applying PRs older than --checkout-depth to avoid Atlantis performing full clones.

Describe the solution you'd like

  • Add an additional --disallow-full-clone option to Atlantis server.
  • If enabled and the merge base isn't present in a shallow checkout1, Atlantis will fail instead of performing a full clone.

Describe the drawbacks of your solution

  • This adds additional complexity to Atlantis.

Describe alternatives you've considered

  • It is hypothetically possible to implement this as a pre-workflow hook2, however, such an implementation would be brittle, as it must independently communicate with SCM. A native feature seems relatively lightweight, and would be highly useful for operators using Atlantis in a monorepo.

Footnotes

  1. https://www.runatlantis.io/docs/checkout-strategy#:~:text=If%20the%20merge%20base%20is%20not%20present%2C%20it%20means%20that%20either%20of%20the%20branches%20are%20ahead%20of%20the%20merge%20base%20by%20more%20than%20%2D%2Dcheckout%2Ddepth%20commits.%20In%20this%20case%20full%20repo%20history%20is%20fetched

  2. https://www.runatlantis.io/docs/pre-workflow-hooks.html#custom-run-command

@DerekTBrown DerekTBrown added the feature New functionality/enhancement label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement
Projects
None yet
Development

No branches or pull requests

1 participant