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

fix: issue with GH App credential not writing if lines already exist #3679

Merged
merged 7 commits into from
Sep 25, 2023

Conversation

JSNortal
Copy link
Contributor

what

Simply a github token credential wouldn't be added if the .git-credentials file contained something

why

  • Needed if you configure atlantis for more than one VCS
  • The fix now addes a new function to check if a GH token credential exists. If it does it calls the replaceLine function if not it calls the appendLine function

tests

references

closes #3674

@JSNortal JSNortal requested a review from a team as a code owner August 17, 2023 09:19
@github-actions github-actions bot added the go Pull requests that update Go code label Aug 17, 2023
@JSNortal JSNortal changed the title Fix issue with GH App credential not writing if lines already exist fix:issue with GH App credential not writing if lines already exist Aug 17, 2023
@JSNortal JSNortal changed the title fix:issue with GH App credential not writing if lines already exist fix: issue with GH App credential not writing if lines already exist Aug 17, 2023
@JSNortal
Copy link
Contributor Author

I fixed the lint issue of removing an unused variable but the linter is showing tons of errors from files I haven't touched. Can anyone give some feedback why?

@jamengual jamengual added waiting-on-review Waiting for a review from a maintainer provider/github labels Sep 13, 2023
@GenPage GenPage added bug Something isn't working quick-win Is obviously something Atlantis should do and will take <4 hrs work and removed waiting-on-review Waiting for a review from a maintainer labels Sep 25, 2023
@GenPage GenPage enabled auto-merge (squash) September 25, 2023 19:25
@GenPage GenPage merged commit 352bbed into runatlantis:main Sep 25, 2023
12 checks passed
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
…unatlantis#3679)

* Fix issue with GH App credential not writing if lines already exist

* Fix lint issue of unused variable.

---------

Co-authored-by: PePe Amengual <[email protected]>
Co-authored-by: Dylan Page <[email protected]>
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
…unatlantis#3679)

* Fix issue with GH App credential not writing if lines already exist

* Fix lint issue of unused variable.

---------

Co-authored-by: PePe Amengual <[email protected]>
Co-authored-by: Dylan Page <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working go Pull requests that update Go code quick-win Is obviously something Atlantis should do and will take <4 hrs work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WriteGitCreds only writes a single line
3 participants