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

SonarQube Endpoint #8

Merged
merged 9 commits into from
Jul 10, 2017
Merged

SonarQube Endpoint #8

merged 9 commits into from
Jul 10, 2017

Conversation

miiitch
Copy link
Contributor

@miiitch miiitch commented Jun 16, 2017

The Sonarqube Endpoint is a like a generic endpoint with the type "sonarqube" We can easily add a generic endpoint from this base but I think a refactoring should be welcomed to avoid code duplication.

@DarqueWarrior
Copy link
Collaborator

This cmdlet requires that you install an extension. It just so happens on my test account I don't have it installed and you get a less that useful error message. Can you uninstall the extension from an account and test? That way you can add better error handling to tell the user which extension they need to install. At a minimum that needs to be in the help.

Second suggestion is make the token secured if entered from the prompts. Look at the Add-TeamAccount as an example. There you can provide the PAT two ways. One way as plain text good for use in scripts and one way as a Secure String good for use of interactive sessions.

@miiitch
Copy link
Contributor Author

miiitch commented Jun 16, 2017

So:

  • I need to test the code without the extension to provide a meaningful message if the extension is not installed
  • I need to use a SecureString for the token inside a parameter set

@DarqueWarrior
Copy link
Collaborator

Correct. With the token you should be able to pass it in either as a plain text as a command line arg or as a secure string if PowerShell prompts for it. Add-TeamAccount does this with the PAT.

@miiitch
Copy link
Contributor Author

miiitch commented Jun 26, 2017

Hi @DarqueWarrior, better?

  Without a Default set I was getting 'Parameter set cannot be resolved using the specified named parameters.'
Added url of extension to error message
  This way people would know where to download the requirements.
Changed parameter name in Add-TeamAccount to match yours.
  Your name choice made it much clearer which to use on the command line.
@DarqueWarrior DarqueWarrior merged commit cc5cac8 into MethodsAndPractices:master Jul 10, 2017
@miiitch miiitch deleted the feature/AddSonarQubeEndpoint branch July 11, 2017 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants