### Install Azure DevOps Python API Source: https://github.com/microsoft/azure-devops-python-api/blob/dev/README.md Installs the azure-devops Python package using pip. ```bash pip install azure-devops ``` -------------------------------- ### Connect to Azure DevOps and Get Projects Source: https://github.com/microsoft/azure-devops-python-api/blob/dev/README.md Demonstrates how to establish a connection to an Azure DevOps organization using a personal access token and retrieve a list of projects. It handles pagination for retrieving all projects. ```Python from azure.devops.connection import Connection from msrest.authentication import BasicAuthentication import pprint # Fill in with your personal access token and org URL personal_access_token = 'YOURPAT' organization_url = 'https://dev.azure.com/YOURORG' # Create a connection to the org credentials = BasicAuthentication('', personal_access_token) connection = Connection(base_url=organization_url, creds=credentials) # Get a client (the "core" client provides access to projects, teams, etc) core_client = connection.clients.get_core_client() # Get the first page of projects get_projects_response = core_client.get_projects() index = 0 while get_projects_response is not None: for project in get_projects_response.value: pprint.pprint("[" + str(index) + "] " + project.name) index += 1 if get_projects_response.continuation_token is not None and get_projects_response.continuation_token != "": # Get the next page of projects get_projects_response = core_client.get_projects(continuation_token=get_projects_response.continuation_token) else: # All projects have been retrieved get_projects_response = None ``` -------------------------------- ### Reporting Security Issues to MSRC Source: https://github.com/microsoft/azure-devops-python-api/blob/dev/SECURITY.md Instructions on how to report security vulnerabilities to Microsoft, including preferred methods and contact information. ```APIDOC Reporting Security Issues: Do not report security vulnerabilities through public GitHub issues. Preferred Method: - Report to the Microsoft Security Response Center (MSRC) at https://msrc.microsoft.com/create-report Alternative Method (without login): - Send email to secure@microsoft.com - Encrypt message with PGP key from https://aka.ms/opensource/security/pgpkey Response Time: - Expect a response within 24 hours. - Follow up via email if no response is received. Additional Information: - https://aka.ms/opensource/security/msrc Required Information for Report: - Type of issue (e.g., buffer overflow, SQL injection, cross-site scripting) - Full paths of source files related to the issue - Location of affected source code (tag/branch/commit or direct URL) - Special configuration required for reproduction - Step-by-step instructions to reproduce the issue - Proof-of-concept or exploit code (if possible) - Impact of the issue and how an attacker might exploit it Bug Bounty Program: - Visit https://aka.ms/opensource/security/bounty for details. ``` -------------------------------- ### Azure DevOps REST API Reference Source: https://github.com/microsoft/azure-devops-python-api/blob/dev/README.md Provides a link to the comprehensive Azure DevOps REST API reference documentation, detailing various APIs for managing Azure DevOps resources. ```APIDOC Azure DevOps REST API Reference: URL: https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-5.1 Description: This reference details the available REST APIs for interacting with Azure DevOps, covering a wide range of functionalities including projects, work items, build, release, and more. It serves as the underlying documentation for the Python library. ``` -------------------------------- ### Directory Navigation Macros Source: https://github.com/microsoft/azure-devops-python-api/blob/dev/scripts/windows/macros.txt Provides shortcuts to navigate up the directory tree by one or more levels. Useful for quickly moving between project directories. ```batch up=cd .. up1=cd .. up2=cd ..\.. up3=cd ..\..\.. up4=cd ..\..\..\.. up5=cd ..\..\..\..\.. up6=cd ..\..\..\..\..\.. up7=cd ..\..\..\..\..\..\.. ``` -------------------------------- ### File Explorer and Editor Macros Source: https://github.com/microsoft/azure-devops-python-api/blob/dev/scripts/windows/macros.txt Macros to open files or directories in Notepad.exe or the default file explorer. The `$`* argument passes any additional arguments to the command. ```batch n=notepad.exe $* e=explorer $* ``` -------------------------------- ### Build Macro Source: https://github.com/microsoft/azure-devops-python-api/blob/dev/scripts/windows/macros.txt Compiles all Python files in the current directory recursively. The `-f` flag forces recompilation. ```batch b=python -m compileall . -f ``` -------------------------------- ### Findstr Search Macros Source: https://github.com/microsoft/azure-devops-python-api/blob/dev/scripts/windows/macros.txt Macros for using the `findstr` command to search for strings within files. They support various options for case-insensitivity, printing filenames, and recursive searching. ```batch f=findstr /ips /c:"$*" * fm=findstr /mips /c:"$*" * fcs=findstr /ips /c:"$*" *.cs fjs=findstr /ips /c:"$*" *.js ts=findstr /ips /c:"$*" *.ts fproj=findstr /ips /c:"$*" *.*proj ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.