cli icon indicating copy to clipboard operation
cli copied to clipboard

fix: honor --auth option

Open pieh opened this issue 1 year ago โ€ข 1 comments

๐ŸŽ‰ Thanks for submitting a pull request! ๐ŸŽ‰

Summary

Fixes https://linear.app/netlify/issue/FRB-1343/internal-server-error-on-netlify-builds-via-bitbucket-pipeline-missing

Our --auth CLI option handling seems a bit hit and miss. We had a lot of optional argument and @ts-expect-error around code that was dealing with tokens - this removes all of those, adjust types to require token from CLI toggle being passed in to helper functions (do note that this doesn't fully ensure type safety, because options.auth has type any, but at least it ensures that something is passed in instead of being optional)


For us to review and ship your PR efficiently, please perform the following steps:

  • [ ] Open a bug/issue before writing your code ๐Ÿง‘โ€๐Ÿ’ป. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire ๐Ÿ”ฅ (e.g. incident related), you can skip this step.
  • [ ] Read the contribution guidelines ๐Ÿ“–. This ensures your code follows our style guide and passes our tests.
  • [ ] Update or add tests (if any source code was changed or added) ๐Ÿงช
  • [ ] Update or add documentation (if features were changed or added) ๐Ÿ“
  • [ ] Make sure the status checks below are successful โœ…

A picture of a cute animal (not mandatory, but encouraged)

pieh avatar Sep 25 '24 09:09 pieh

@pieh is this something we want to get over the finish line?

serhalp avatar Oct 08 '24 19:10 serhalp

This got really outdated and has so many merge conflicts that is not worth keeping open. There is a workaround with NETLIFY_AUTH_TOKEN=$NETLIFY_AUTH npx netlify deploy --build, so I'll close this PR to clean up PR list.

pieh avatar Feb 14 '25 15:02 pieh