Git Product home page Git Product logo

Comments (5)

ArinGhazarian avatar ArinGhazarian commented on August 9, 2024

For generate-script when PATs are provided, should we also include the PATs in the generated script? I mean we have two options:

  1. Use the provided PATs only to get the required data but don't include them in the generated script (i.e. don't include --ado-pat option at the end of create-team script, etc.). This way the script still expects the PATs to be set as env variables.
  2. Include the PATs (i.e. --github-pat or --ado-pat) in the generated script at the end of each command. This way the script will entirely use the provided PATs and no env variable needs to be set.

from gh-gei.

roferg avatar roferg commented on August 9, 2024

Why can't we just pull the PATs from the env variables?

from gh-gei.

ArinGhazarian avatar ArinGhazarian commented on August 9, 2024

Why can't we just pull the PATs from the env variables?

Of course we can, but this issue is to support passing them as command args. So I was just wondering what the desired behavior in for generate-script would be. Since we have the two options I mentioned in my question, we can go with both. Personally I think that for generate-script we should just use the provided PATs to fetch the required data to be able to generate the script and we shouldn't include the PATs in the script (at the end of each command).

from gh-gei.

dylan-smith avatar dylan-smith commented on August 9, 2024

so if I think about why I wanted to do this work, it's to make things more easy/convenient for people that don't want to mess around with how to set env variables, and just want to pass everything on the command-line.

I would say if they pass them on the command line for generate script, then the generated script should work without needing them to manually set env vars. I see 3 options that I think would both be fine IMO:

  1. Have the migrate.ps1 script include a couple lines at the start that set the env vars, and don't pass them in to each individual command
  2. Pass the PAT's into each individual command in the script.
  3. Don't allow secrets as args in generate-script (only in the other commands).

In 1/2 cases the generated script will contain their secrets, I would suggest having generate-script spit out a warning making them aware of that fact.

I would probably lean towards whichever of these is the easiest to implement, which has to be 3.

from gh-gei.

ArinGhazarian avatar ArinGhazarian commented on August 9, 2024

Yup 3 is the easiest to implement given the fact that if a CLI command has more than 16 args then we cannot use the Func delegate format for Invoke and we need to switch to a container class for args (see this for more info). But now I am wondering if it would be any helpful to pass the env variables as command args for other commands!

from gh-gei.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.