https://github.com/epomatti/get-azuredevops-repositories
A script that connects to Azure DevOps API and getting useful information about repositories.
https://github.com/epomatti/get-azuredevops-repositories
azure-devops-api nodejs
Last synced: 3 months ago
JSON representation
A script that connects to Azure DevOps API and getting useful information about repositories.
- Host: GitHub
- URL: https://github.com/epomatti/get-azuredevops-repositories
- Owner: epomatti
- License: mit
- Created: 2019-10-29T16:33:12.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-08T13:35:48.000Z (over 2 years ago)
- Last Synced: 2025-01-17T18:41:52.800Z (5 months ago)
- Topics: azure-devops-api, nodejs
- Language: JavaScript
- Homepage:
- Size: 172 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Get Azure DevOps Repositories

Script that connects to Azure DevOps API using the client for Node.js and gets some repository information.
This SDK can be useful for large migrations that require automated commands on a large number of repositories.
## Getting Started
```sh
# project setup
cp .env.example .env# run it
yarn install
yarn start
```### Steps to create .env file
You'll need to provide the following configuration:
- **AZURE_ORG_URL** - This is the URL pointing to your Organization root (e.g. https://dev.azure.com/yourorgname).
- **AZURE_PERSONAL_ACCESS_TOKEN** - Create a PAT in your Azure DevOps profile (Follow the [documentation](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops)).
- **AZURE_PROJECT_NAME** - This is the plain name of the project in Azure, also part of the URL of repositories.### Output
The script returns the repository URLs. Example:
```
The script found 3 repositories:
private https://[email protected]/epomatti/Test/_git/repo1
private https://[email protected]/epomatti/Test/_git/repo2
private https://[email protected]/epomatti/Test/_git/repo3
```## References
[Create a Personal Access Token](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops)
[Azure DevOps Client for Node.js](https://github.com/microsoft/azure-devops-node-api)
[Git Get Repository](https://docs.microsoft.com/en-us/rest/api/azure/devops/git/repositories/get?view=azure-devops-rest-4.1&viewFallbackFrom=azure-devops-rest-5.1#gitrepository)
[REST API Reference](https://docs.microsoft.com/en-us/rest/api/azure/devops/git/repositories/list?view=azure-devops-rest-5.1)