Giter VIP home page Giter VIP logo

azure-devops-cli-extension's Issues

The cli is taking multiple seconds to run even when I don't query anything.

I'm running the cli in powershell , and seeing ~3-5 seconds.

Measure-Command { vsts | out-host } generates:

Visual Studio Team Services CLI 0.1.0b0

Use `vsts -h` to see available commands or go to https://aka.ms/vsts-cli.

Available commands:
    build    : Commands to work with and manage builds.
    code     : Commands to work with and manage code repositories.
    configure: Configure the VSTS CLI or view your configuration.
    feedback : Displays information on how to provide feedback to the VSTS CLI team.
    login    : Set the credential (PAT) to use for a particular account.
    logout   : Clear the credential for a particular account.
    project  : Commands to work with and manage team projects.
    work     : Commands to work with and manage work items.


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 2
Milliseconds      : 879
Ticks             : 28793487
TotalDays         : 3.33257951388889E-05
TotalHours        : 0.000799819083333333
TotalMinutes      : 0.047989145
TotalSeconds      : 2.8793487
TotalMilliseconds : 2879.3487

PowerShell CLI extension

I have created a first working prototype in my GitHub repo here that brings the vsts-cli to PowerShell by extending its functionality to

  • parsing the output of the cli to objects so that one can easily access each property
  • providing tab completion

I was thinking of creating a PR to add it to your README.md in something like a 3rd party extensions/tools section.
What do you think?

no output for vsts-login

I am unable to log in (I think) using my PAT. I can't tell whether or not that is the real problem because the vsts-login command returns no output.

expected behavior:

vsts login --token <some bogus token>

I would expect the app to print to stderr, something like "failed to log in. check your credentials."

vsts login --token <some valid token>

I would expect the app to print nothing at all or a success message.

TFX-CLI had the same problem but there was a TFX_TRACE environmental variable.

Can somebody shed some light on why this cli application does not output to std? What gives?

Thanks.

Queueing a build fails with poor error message

I tried queue a build and received this error:

root : 'NoneType' object has no attribute 'message'

That wasn't very helpful, so I added --debug and got something a bit more helpful:

msrest.http_logger : b'{"ClassName":"Microsoft.TeamFoundation.Build.WebApi.BuildRequestValidationFailedException","Messa
ge":"Could not queue the build because there were validation errors or warnings.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":null,"RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-
2146232832,"Source":null,"WatsonBuckets":null,"m_logException":false,"m_reportException":false,"m_errorCode":0,"m_logLevel":"warning","m_eventId":3000,"ValidationResults":[{"result":"error","message":"An error occurred while loading the YAML build definition. An object ID must be 40 characters long and only have hex digits. Passed in object ID: ."}]}'

Here's the important part I think:

An error occurred while loading the YAML build definition. An object ID must be 40 characters long and only have hex digits. Passed in object ID: .

I don't think there is anything wrong with the YAML - builds from the UI work just fine.

Support setting PR status

I don't doubt that this is already on the radar for the vsts-cli team, but supporting setting PR statuses will be a very valuable addition to the supported commands. For our environment, it's actually the only REST API call we're really using right now so that we can block PR completion until an external build/test process has finished.

For general reference, the REST API docs for PR statuses is here:
https://www.visualstudio.com/en-us/docs/integrate/api/git/pull-requests/pullrequeststatuses

Thanks!

Feature Request: Add Ability to specify multiple PRs using "vsts code pr --id"

When we prep for a code release, we identify a bunch of PRs to complete, merging into our mainline branch. I'd like to be able to specify a list of PRs using "vsts code pr" so that I can monitor the state of each of the PRs over time. Ideally, I'd do something like
vsts code pr --id 123,456,789,etc --output table
and be able to see which PRs are completed and which ones still need attention.

thanks
--Bill

Install on macOS with Python3 fails

Using these install instructions and just accepting defaults:

-- The executable will be in '/Users/carlo.wahlstedt/bin'.
-- Downloading virtualenv package from https://pypi.python.org/packages/source/v/virtualenv/virtualenv-15.0.0.tar.gz.
-- Downloaded virtualenv package to /var/folders/zd/kbyf92z92517trsjwh5h3mg9xp9gss/T/tmpskokwh3b/virtualenv-15.0.0.tar.gz.
-- Checksum of /var/folders/zd/kbyf92z92517trsjwh5h3mg9xp9gss/T/tmpskokwh3b/virtualenv-15.0.0.tar.gz OK.
-- Extracting '/var/folders/zd/kbyf92z92517trsjwh5h3mg9xp9gss/T/tmpskokwh3b/virtualenv-15.0.0.tar.gz' to '/var/folders/zd/kbyf92z92517trsjwh5h3mg9xp9gss/T/tmpskokwh3b'.
-- Executing: ['/usr/local/opt/python3/bin/python3.6', 'virtualenv.py', '--python', '/usr/local/opt/python3/bin/python3.6', '/Users/carlo.wahlstedt/lib/vsts-cli']
Already using interpreter /usr/local/opt/python3/bin/python3.6
Using base prefix '/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/carlo.wahlstedt/lib/vsts-cli/bin/python3.6
Also creating executable in /Users/carlo.wahlstedt/lib/vsts-cli/bin/python
Installing setuptools, pip, wheel...done.
-- Current executable /usr/local/opt/python3/bin/python3.6
-- Installed executable /Users/carlo.wahlstedt/lib/vsts-cli/bin/python
-- Is Python.framework
-- Installed Python executable exists
-- Created backup of installed Python executable
-- Replaced installed Python executable
-- Executing: ['/Users/carlo.wahlstedt/lib/vsts-cli/bin/pip', 'install', '--cache-dir', '/var/folders/zd/kbyf92z92517trsjwh5h3mg9xp9gss/T/tmpskokwh3b', '--pre', 'vsts-cli', '--upgrade', '--extra-index-url', 'https://vstscli.azurewebsites.net/']
Requirement already up-to-date: vsts-cli in /usr/local/lib/python3.6/site-packages
Requirement already up-to-date: knack in /usr/local/lib/python3.6/site-packages (from vsts-cli)
Requirement already up-to-date: vsts-cli-common==0.1.0b2.dev4422419 in /usr/local/lib/python3.6/site-packages (from vsts-cli)
Requirement already up-to-date: vsts-cli-work==0.1.0b2.dev4422419 in /usr/local/lib/python3.6/site-packages (from vsts-cli)
Requirement already up-to-date: vsts-cli-build==0.1.0b2.dev4422419 in /usr/local/lib/python3.6/site-packages (from vsts-cli)
Requirement already up-to-date: vsts-cli-code==0.1.0b2.dev4422419 in /usr/local/lib/python3.6/site-packages (from vsts-cli)
Requirement already up-to-date: vsts-cli-team==0.1.0b2.dev4422419 in /usr/local/lib/python3.6/site-packages (from vsts-cli)
Requirement already up-to-date: jmespath in /usr/local/lib/python3.6/site-packages (from knack->vsts-cli)
Requirement already up-to-date: tabulate in /usr/local/lib/python3.6/site-packages (from knack->vsts-cli)
Requirement already up-to-date: pygments in /usr/local/lib/python3.6/site-packages (from knack->vsts-cli)
Requirement already up-to-date: pyyaml in /usr/local/lib/python3.6/site-packages (from knack->vsts-cli)
Requirement already up-to-date: argcomplete in /usr/local/lib/python3.6/site-packages (from knack->vsts-cli)
Requirement already up-to-date: colorama in /usr/local/lib/python3.6/site-packages (from knack->vsts-cli)
Requirement already up-to-date: six in /usr/local/lib/python3.6/site-packages (from knack->vsts-cli)
Requirement already up-to-date: vsts~=0.1.0b2.dev in /usr/local/lib/python3.6/site-packages (from vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: keyring in /usr/local/lib/python3.6/site-packages (from vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: python-dateutil in /usr/local/lib/python3.6/site-packages (from vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: vsts-cli-work-common==0.1.0b2.dev4422419 in /usr/local/lib/python3.6/site-packages (from vsts-cli-work==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: vsts-cli-build-common==0.1.0b2.dev4422419 in /usr/local/lib/python3.6/site-packages (from vsts-cli-build==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: vsts-cli-code-common==0.1.0b2.dev4422419 in /usr/local/lib/python3.6/site-packages (from vsts-cli-code==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: vsts-cli-team-common==0.1.0b2.dev4422419 in /usr/local/lib/python3.6/site-packages (from vsts-cli-team==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: msrest>=0.4.5 in /usr/local/lib/python3.6/site-packages (from vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: requests-oauthlib>=0.5.0 in /usr/local/lib/python3.6/site-packages (from msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: requests~=2.14 in /usr/local/lib/python3.6/site-packages (from msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: isodate>=0.5.4 in /usr/local/lib/python3.6/site-packages (from msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: oauthlib>=0.6.2 in /usr/local/lib/python3.6/site-packages (from requests-oauthlib>=0.5.0->msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests~=2.14->msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests~=2.14->msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Requirement already up-to-date: idna<2.7,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests~=2.14->msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b2.dev4422419->vsts-cli)
Traceback (most recent call last):
  File "/var/folders/zd/kbyf92z92517trsjwh5h3mg9xp9gss/T/vsts_cli_install_tmp_XXXX.uskjUUOL", line 444, in <module>
    main()
  File "/var/folders/zd/kbyf92z92517trsjwh5h3mg9xp9gss/T/vsts_cli_install_tmp_XXXX.uskjUUOL", line 426, in main
    exec_filepath = create_executable(exec_dir, install_dir)
  File "/var/folders/zd/kbyf92z92517trsjwh5h3mg9xp9gss/T/vsts_cli_install_tmp_XXXX.uskjUUOL", line 173, in create_executable
    cur_stat = os.stat(exec_filepath)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/carlo.wahlstedt/bin/vsts'

macOS: 10.12.6

How is the --detect argument used?

--detect looks powerful. How do you name/format the configuration file it reads?

C:\repos\fabrikam [master ≡ +0 ~1 -0 !]> vsts work item create --help

Command
    vsts work item create: Create a work item.

Arguments
    --title [Required]: Title of the work item.
    --type  [Required]: Name of the work item type (e.g. Bug).
    --area            : Area the work item is assigned to (e.g. Demos).
    --assigned-to     : Name of the person the work item is assigned-to (e.g. fabrikam).
    --description     : Description of the work item.
-   --detect          : When 'On' unsupplied arg values will be detected from the current working
-                       directory's repo.  Allowed values: off, on.
    --discussion      : Comment to add to a discussion in a work item.
    --fields -f       : Space separated "field=value" pairs for custom fields you would like to set.
    --instance -i     : The URI for the VSTS account (https://<account>.visualstudio.com) or your
                        TFS project collection.
    --iteration       : Iteration path of the work item (e.g. Demos\Iteration 1).
    --open            : Open the work item in the default web browser.
    --project -p      : Name or ID of the team project.
    --reason          : Reason for the state work item.
    --state           : State of the work item (e.g. active).

Global Arguments
    --debug           : Increase logging verbosity to show all debug logs.
    --help -h         : Show this help message and exit.
    --output -o       : Output format.  Allowed values: json, jsonc, table, tsv.  Default: json.
    --query           : JMESPath query string. See http://jmespath.org/ for more information and
                        examples.
    --verbose         : Increase logging verbosity. Use --debug for full debug logs.

Apologies in advance if this is in the docs already. I couldn't find it.

Help commands have bad performance

Trying to get help takes about a second, which is a very noticeable lag and given that it should not need to call a REST endpoint for that unlike other commands, I do not expect it to take so long.
In PowerShell (on a 4 core Xeon VM) for example:

> Measure-Command { vsts -h }
Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 0
Milliseconds      : 907
Ticks             : 9077662
TotalDays         : 1.05065532407407E-05
TotalHours        : 0.000252157277777778
TotalMinutes      : 0.0151294366666667
TotalSeconds      : 0.9077662
TotalMilliseconds : 907.7662

Add options to create repo command to create with readme, gitignore

Hi All,

Having the option to state whether a new repository is created with a blank readme.md and .gitignore files might be useful.

Also been able to create a repository with a branch policy would be such a time saver. Even better if you could set a global branch policy for all repositories created and apply that template to your chosen branch such as master branch...

Unless someone know of a better way of doing this via command line?

Regards

Matt

Command to get the builds for a Pull Request

Right now I'm having to filter all of the builds in the list by the value of system.pullRequest.pullRequestId in the parameters section of build results in order to find the builds associated with a Pull Request. Is this the right way to do this? I'd love if the PR information from `vsts code pr list' included build ids associated with the PR.

Perhaps it does or can and I'm just not seeing it.

Calling vsts-cli via powershell from a build agent is not recognised

Hi,
I have created a powershell script which uses the vsts-cli to generate release notes for our product. This script is part of a TFS on-premise release process. When I run the script manually everything works as planned however when the script is ran as part of the release using the build agent the following error is thrown:

2017-12-22T08:39:04.1947486Z ##[error]vsts : The term 'vsts' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.

The server the agent is on has the vsts-cli installed and configured correctly and as I have said before I can run the script manually and it works correctly. Is there something I am missing here?

Thanks

Version numbers are not consistent

When attempting to find the version of installed VSTS CLI, I stumbled across the command vsts -v.
It returned a higher (correct?) version number than when running vsts by itself:
image

As a side note, I couldn't find any documentation about vsts -v.

Extension management commands

Commands to manage installed extensions in a VSTS account or TFS project collection.

Note these commands are not for packaging or publishing extensions, only managing extensions that have already been published to the Marketplace/Gallery.

Proposed design

List installed extensions

vsts extension list

Optional arguments

  • --include-built-in. Include built-in extensions in the results.
    ** Implementation note: the CLI will need to manually remove extensions from the response that have the "builtin" flag if the caller does not want to get installed extensions. There is no REST API parameter for this, but the normal case is to not show built-in extensions since they can't really be managed).
  • ---include-disabled: Include installed extensions that are currently disabled in the results.

Show, install, or uninstall an extension

vsts extension show --id {publisherId.extensionId}
vsts extension install --id {publisherId.extensionId}
vsts extension uninstall --id {publisherId.extensionId}
vsts extension enable ---id {publisherId.extensionId}
vsts extension disable --id {publisherId.extensionId}

Table columns for commands that return a response (i.e. all but "uninstall")

  • ID (combines publisher ID plus "." plus extension ID)
  • Name ("Team Calendar")
  • Publisher ("Microsoft DevLabs")
  • Version ("0.3.1")
  • Last Updated (a date/time)
  • States (enabled or disabled)
  • Flags (comma-separated list .. if "none", don't show anything -- leave column blank)

generate_command_inventory.py --params

I get the following error when I try this python .\generate_command_inventory.py --commands build --params list

Traceback (most recent call last):
  File ".\generate_command_inventory.py", line 57, in <module>
    cmd_args = cmd_table[cmd_name]['arguments']
TypeError: 'CLICommand' object is not subscriptable

Am I using it correctly. Optimally, I'd like to get all the commands back and all the parameters for that command but this python .\generate_command_inventory.py only brings back the cmds.

image

Allow output column configuration

When using table or tsv output, I'd like to be able to configure the output columns, rather than having the fixed set of columns. Ideally, i can also set these on command by command basis.

Clarify help text for project and instance parameters

The in-product help (i.e. --help) and the docs indicate that --project and --instance are optional arguments in many calls, but this is only true if --detect on is passed and the CLI is able to detect the project and instance from the local Git directory.

We should clarify the help text for both of these arguments to explain when one or both is required, and refer to the detect option. Also may need to update the error text shown by the CLI when no project is supplied.

Better TFVC Support

Add features to VSTS-CLI so that it can work similarly to the Git CLI, but for TFVC. This would enable the possibility of using any editor on any system to easily develop TFVC projects. At the moment TFVC managed projects are a huge pain to use with anything other than Visual Studio IDE on Windows.

If these features are added and improved Visual Studio Code's VSTS extension can latch on top of this to easily add the missing TFVC features, and allow easier use with all editors as they would also be able latch on to this command line application.

Some feature examples:

  • Committing
  • Cloning (+ Workspace management and creation)
  • Branching

Commands to get artifacts produced in a build

Quite possible I'm missing it in all the JSON, but I'm trying to write a script such that I can download the artifacts for a build and then do things with it. From what I can tell, the information about builds that I get doesn't include a download URL for the artifacts.

What am I missing?

SSH URL support for tfs repos

I'm trying to create a pull request to master branch, but i'm getting the error message "ERROR: must be str, not NoneType".

The problem only ocurrs when i'm using SSH Url to clone the repository. If i'm clone the repository using HTTP, works normaly.

I'm running the following command to create the pull request:

git pr create --target-branch master

Running the same command with --debug option, i'm getting this detailed error:

DEBUG: Command arguments: ['code', 'pr', 'create', '--target-branch', 'master', '--debug']
DEBUG: Event: Cli.PreExecute [<function VstsCLI.pre_execute at 0x0000012C5E273488>]
DEBUG: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x0000012C5D4E7F28>, <function OutputProducer.on_global_arguments at 0x0000012C5D504EA0>, <function CLIQuery.on_global_arguments at 0x0000012C5D583AE8>]
DEBUG: Event: CommandInvoker.OnPreCommandTableCreate [<function CLILogging.remove_logger_flags at 0x0000012C5D4EA048>]
DEBUG: Event: CommandLoader.OnLoadCommandTable []
DEBUG: Event: CommandLoader.OnLoadArguments []
DEBUG: Event: CommandInvoker.OnPostCommandTableCreate []
DEBUG: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: Event: CommandInvoker.OnPreParseArgs []
DEBUG: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x0000012C5D504F28>, <function CLIQuery.handle_query_parameter at 0x0000012C5D583B70>]
DEBUG: root : Remote url: ssh://MY-TFS-SERVER:22/tfs/COLLECTION/SAMPLE_PROJECT/_git/SAMPLE_PROJECT
INFO: root : Loading cache file: C:\Users\USER\.vsts\cli\cache\remotes.json
DEBUG: root : attempting to read file C:\Users\USER\.vsts\cli\cache\remotes.json as utf-8-sig
ERROR: root : must be str, not NoneType
Traceback (most recent call last):
  File "C:\Program Files (x86)\Microsoft SDKs\VSTS\CLI\lib\site-packages\vsts\cli\code\common\pull_request.py", line 166, in create_pull_request
    repo=repository)
  File "C:\Program Files (x86)\Microsoft SDKs\VSTS\CLI\lib\site-packages\vsts\cli\common\services.py", line 135, in resolve_instance_project_and_repo
    git_info = get_vsts_info_from_current_remote_url()
  File "C:\Program Files (x86)\Microsoft SDKs\VSTS\CLI\lib\site-packages\vsts\cli\common\services.py", line 187, in get_vsts_info_from_current_remote_url
    info = VstsGitUrlInfo(get_remote_url(VstsGitUrlInfo.is_vsts_url_candidate))
  File "C:\Program Files (x86)\Microsoft SDKs\VSTS\CLI\lib\site-packages\vsts\cli\common\vsts_git_url_info.py", line 41, in __init__
    vsts_info = self.get_vsts_info(remote_url)
  File "C:\Program Files (x86)\Microsoft SDKs\VSTS\CLI\lib\site-packages\vsts\cli\common\vsts_git_url_info.py", line 67, in get_vsts_info
    uri = 'https://' + netloc + '/' + components.path
TypeError: must be str, not NoneType
ERROR: must be str, not NoneType

thanks,
Cláudio

Add methods for Git pushes

Adding methods for Git pushes (with methods for Git refs (PR #117) and annotated tags (PR #118)) allows users to:

  1. find a commit to branch from (typically from the head of a branch or a given tag)
  2. add/edit/move files in that branch

With the pull request commands already available, it is possible to automate modifications to a Git branch.

See #121 for wip

Request for feedback: Package Management commands

Commands to manage packages and feeds in VSTS or TFS. All feedback welcome!

Work with feeds

vsts pk feed list
vsts pk feed show --name <name>
vsts pk feed delete --name <name>
vsts pk feed create --name <name>
vsts pk feed update --name <name> [--description <desc>]
vsts pk feed view create --feed-name <name> --view-name <name>
vsts pk feed view delete --feed-name <name> --view-name <name>

Work with packages

vsts pk package list --feed-name <name>
vsts pk package list-versions --feed-name <name> --package-name <name>
vsts pk package promote --feed-name <name> –package-name <name> --version <version(s)> --view-name <name>
vsts pk package promote --feed-name <name> –package-name <name> --version <version(s)> --view-name <name>
vsts pk package unlist --feed-name <name> --package-name <name> --version <version(s)>
vsts pk package deprecate --feed-name <name> --package-name <name> --version <version(s)> 
vsts pk package download --feed-name <name> --package-name <name> --version <version>
vsts pk package delete --feed-name <name> --package-name <name> --version <version(s)>
vsts pk package show --name <name>  --version <version(s)>

Configure packaging clients

vsts pk authenticate –client-type <client> --path-to-client <path>

Please release more often (it is pre-release anyway)

The PowerShell team releases their pre-releases every 3 weeks (and they started doing that already in the early Alpha days).
I see many useful features/improvements being added, please (pre)-release them as well.

Automatically detect reviewers

When creating a PR on the portal, the reviewer is automatically added (due to some setting I believe). It would be nice if the 'pr create' command would automatically add default reviewers.

Login fails when connecting to TFS instance with self-signed certificate

Attempting to login against our local TFS instance which uses a cert signed by an internal/private CA fails. Adding the --debug switch confirms my suspicion that the cert isn't trusted. Is there any way to provide an alternate CA bundle? Or to tell the CLI to accept a specific CA or cert?

urllib3.connectionpool : Retrying (Retry(total=2, connect=3, read=3, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)'),)': /tfs/defaultcollection2/_apis

Being able to manage Iterations

With Visual Studio Team Services CLI 0.1.0b0, it's not possible to create an Iteration.
It would save a lot of time to be able to do it from the command line, potentially with a generator, for example: generate for me 10 iterations starting next Monday.

Manage Users

CLI should have the ability to add/remove users (Basic, Stakeholders)

Branch parameter inconsistent

vsts build queue has a --source-branch parameter but vsts list has a --branch parameter.
I prefer to have the shorter --branch parameter but what counts at the end is consistency

Find hash of a commit based on the name of its tag

[This question is for the vsts-python-api, as I am writing the corresponding classes for the vsts-cli.] I'm trying to retrieve the Git hash of a commit, knowing only the name of the tag pointing to this commit.

When using the /refs endpoint (filtering for tags), I can only retrieve an annotated tag with the returned ref's object_id.

Is there a way to retrieve a simple tag with a ref's object_id?

Question: How to add multiline description to PR

The reference docs have no examples to show just how you specify various things on the command line. It definitely needs good examples in order to be less obscure.

How do I create/update a multi-line description using the CLI? (Or is this even possible?)

Allow specifying variables when queueing builds

We have a mandatory parameter in our build that is specified in the Web UI.

If I try to queue such a build from vsts, I get an error:

PS> vsts build queue --definition-name Build_Test --verbose -o json
'NoneType' object has no attribute 'message'

Login fails when connecting to TFS instance with self-signed certificate

Attempting to login against our local TFS instance which uses a cert signed by an internal/private CA fails. Adding the --debug switch confirms my suspicion that the cert isn't trusted. Is there any way to provide an alternate CA bundle? Or to tell the CLI to accept a specific CA or cert?

urllib3.connectionpool : Retrying (Retry(total=2, connect=3, read=3, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)'),)': /tfs/defaultcollection2/_apis

Error installing vsts-cli on python 2.7.9 on Mac Sierra

Installing VSTS CLI with defaults results in the following error.

Installing setuptools, pip, wheel...done.
-- Current Python executable: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-- Installed Python executable: /Users/eu.gene.lim/lib/vsts-cli/bin/python
-- Is Python.framework
-- Installed Python executable exists
-- Created backup of installed Python executable
-- Replaced installed Python executable
-- Executing: ['/Users/eu.gene.lim/lib/vsts-cli/bin/python', '-m', 'pip', 'install', '--force-reinstall', '--cache-dir', '/var/folders/mr/jf3hm0rd59vb8mk38xp_j6lcl25rf2/T/tmpmgy7zg', 'vsts-cli', '--upgrade']
Collecting vsts-cli
Downloading vsts_cli-0.1.0b3-py2.py3-none-any.whl
Collecting vsts-cli-code==0.1.0b3 (from vsts-cli)
Downloading vsts_cli_code-0.1.0b3-py2.py3-none-any.whl
Collecting knack==0.2.0 (from vsts-cli)
Downloading knack-0.2.0-py2.py3-none-any.whl (58kB)
100% |████████████████████████████████| 61kB 2.2MB/s
Collecting vsts-cli-build==0.1.0b3 (from vsts-cli)
Downloading vsts_cli_build-0.1.0b3-py2.py3-none-any.whl
Collecting vsts-cli-work==0.1.0b3 (from vsts-cli)
Downloading vsts_cli_work-0.1.0b3-py2.py3-none-any.whl
Collecting vsts-cli-common==0.1.0b3 (from vsts-cli)
Downloading vsts_cli_common-0.1.0b3-py2.py3-none-any.whl
Collecting vsts-cli-team==0.1.0b3 (from vsts-cli)
Downloading vsts_cli_team-0.1.0b3-py2.py3-none-any.whl
Collecting python-dateutil (from vsts-cli-code==0.1.0b3->vsts-cli)
Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
100% |████████████████████████████████| 194kB 1.9MB/s
Collecting vsts-cli-code-common==0.1.0b3 (from vsts-cli-code==0.1.0b3->vsts-cli)
Downloading vsts_cli_code_common-0.1.0b3-py2.py3-none-any.whl
Collecting argcomplete (from knack==0.2.0->vsts-cli)
Downloading argcomplete-1.9.3-py2.py3-none-any.whl
Collecting six (from knack==0.2.0->vsts-cli)
Downloading six-1.11.0-py2.py3-none-any.whl
Collecting pygments (from knack==0.2.0->vsts-cli)
Downloading Pygments-2.2.0-py2.py3-none-any.whl (841kB)
100% |████████████████████████████████| 849kB 1.1MB/s
Collecting colorama (from knack==0.2.0->vsts-cli)
Downloading colorama-0.3.9-py2.py3-none-any.whl
Collecting jmespath (from knack==0.2.0->vsts-cli)
Downloading jmespath-0.9.3-py2.py3-none-any.whl
Collecting tabulate (from knack==0.2.0->vsts-cli)
Downloading tabulate-0.8.2.tar.gz (45kB)
100% |████████████████████████████████| 51kB 1.8MB/s
Collecting pyyaml (from knack==0.2.0->vsts-cli)
Downloading PyYAML-3.12.tar.gz (253kB)
100% |████████████████████████████████| 256kB 1.0MB/s
Collecting vsts-cli-build-common==0.1.0b3 (from vsts-cli-build==0.1.0b3->vsts-cli)
Downloading vsts_cli_build_common-0.1.0b3-py2.py3-none-any.whl
Collecting vsts-cli-work-common==0.1.0b3 (from vsts-cli-work==0.1.0b3->vsts-cli)
Downloading vsts_cli_work_common-0.1.0b3-py2.py3-none-any.whl
Collecting vsts~=0.1.0b2.dev (from vsts-cli-common==0.1.0b3->vsts-cli)
Downloading vsts-0.1.0b2-py2.py3-none-any.whl (580kB)
100% |████████████████████████████████| 583kB 1.3MB/s
Collecting keyring (from vsts-cli-common==0.1.0b3->vsts-cli)
Downloading keyring-11.0.0-py2.py3-none-any.whl
Collecting vsts-cli-team-common==0.1.0b3 (from vsts-cli-team==0.1.0b3->vsts-cli)
Downloading vsts_cli_team_common-0.1.0b3-py2.py3-none-any.whl
Collecting msrest>=0.4.5 (from vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b3->vsts-cli)
Downloading msrest-0.4.26-py2.py3-none-any.whl (44kB)
100% |████████████████████████████████| 51kB 3.5MB/s
Collecting certifi>=2017.4.17 (from msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b3->vsts-cli)
Downloading certifi-2018.1.18-py2.py3-none-any.whl (151kB)
100% |████████████████████████████████| 153kB 1.7MB/s
Collecting requests~=2.14 (from msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b3->vsts-cli)
Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
100% |████████████████████████████████| 92kB 2.7MB/s
Collecting enum34>=1.0.4; python_version < "3.4" (from msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b3->vsts-cli)
Downloading enum34-1.1.6-py2-none-any.whl
Collecting isodate>=0.6.0 (from msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b3->vsts-cli)
Downloading isodate-0.6.0-py2.py3-none-any.whl (45kB)
100% |████████████████████████████████| 51kB 2.3MB/s
Collecting requests-oauthlib>=0.5.0 (from msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b3->vsts-cli)
Downloading requests_oauthlib-0.8.0-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests~=2.14->msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b3->vsts-cli)
Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |████████████████████████████████| 143kB 2.3MB/s
Collecting urllib3<1.23,>=1.21.1 (from requests~=2.14->msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b3->vsts-cli)
Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
100% |████████████████████████████████| 133kB 1.8MB/s
Collecting idna<2.7,>=2.5 (from requests~=2.14->msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b3->vsts-cli)
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 3.0MB/s
Collecting oauthlib>=0.6.2 (from requests-oauthlib>=0.5.0->msrest>=0.4.5->vsts~=0.1.0b2.dev->vsts-cli-common==0.1.0b3->vsts-cli)
Downloading oauthlib-2.0.6.tar.gz (127kB)
100% |████████████████████████████████| 133kB 2.1MB/s
Installing collected packages: argcomplete, six, pygments, colorama, jmespath, tabulate, pyyaml, knack, python-dateutil, certifi, chardet, urllib3, idna, requests, enum34, isodate, oauthlib, requests-oauthlib, msrest, vsts, keyring, vsts-cli-common, vsts-cli-code-common, vsts-cli-code, vsts-cli-build-common, vsts-cli-build, vsts-cli-work-common, vsts-cli-work, vsts-cli-team-common, vsts-cli-team, vsts-cli
Found existing installation: argcomplete 1.9.3
Uninstalling argcomplete-1.9.3:
Successfully uninstalled argcomplete-1.9.3
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/utils/init.py", line 267, in renames
shutil.move(old, new)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/mr/jf3hm0rd59vb8mk38xp_j6lcl25rf2/T/pip-t1ktxb-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
Traceback (most recent call last):
File "/var/folders/mr/jf3hm0rd59vb8mk38xp_j6lcl25rf2/T/vsts_cli_install_tmp_XXXX.JFywNqGM", line 481, in
main()
File "/var/folders/mr/jf3hm0rd59vb8mk38xp_j6lcl25rf2/T/vsts_cli_install_tmp_XXXX.JFywNqGM", line 441, in main
install_cli(install_dir, tmp_dir)
File "/var/folders/mr/jf3hm0rd59vb8mk38xp_j6lcl25rf2/T/vsts_cli_install_tmp_XXXX.JFywNqGM", line 175, in install_cli
exec_command(cmd, cwd=os.path.dirname(cli_python))
File "/var/folders/mr/jf3hm0rd59vb8mk38xp_j6lcl25rf2/T/vsts_cli_install_tmp_XXXX.JFywNqGM", line 131, in exec_command
subprocess.check_call(command_list, cwd=cwd, env=env, stderr=subprocess.STDOUT)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/eu.gene.lim/lib/vsts-cli/bin/python', '-m', 'pip', 'install', '--force-reinstall', '--cache-dir', '/var/folders/mr/jf3hm0rd59vb8mk38xp_j6lcl25rf2/T/tmpmgy7zg', 'vsts-cli', '--upgrade']' returned non-zero exit status 2

Build Task with online vsts CLI commands

Just like how there are tasks for powershell and batch script commands, I would love one for VSTS CLI commands. The key being that the task would download the CLI as needed, so I don't need to worry about keeping it updated and so hosted agents can use it.

Ability to open (in browser) foo from cli

Hello! I find vsts cli quite useful. A feature I would really like to have is 'open' akin to 'show'. While 'show' shows the details of foo (let's say, pr, for example) using its id, 'open' should open the pr in the [default] browser to review. foo could be a work item, a pr, a build, a branch or anything else 'show' supports (or more). Currently, even if I can observe prs or builds from the console, I need to click multiple times and navigate to what I'm interested in. I feel the cli can fill that gap by directly bringing me to my destination with zero clicks involved.

I'm open to submitting a PR for this feature.

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.