From 086618fe728dc6d7bcdcac5b6813ef2da3e9ade7 Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Sat, 8 Nov 2025 10:32:30 +0100 Subject: [PATCH] Added a heredoc to get-token. --- get-token.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/get-token.py b/get-token.py index ad8d2b3..dbfc951 100755 --- a/get-token.py +++ b/get-token.py @@ -1,4 +1,19 @@ #!/usr/bin/env python3 +""" +Get an Azure DevOps token and print it in a format suitable for exporting as an environment variable. + +Usage: + eval $(python get-token.py) + + or + + python get-token.py > set-ado-token.sh + source set-ado-token.sh + + Now you can use the ADO_TOKEN environment variable, for example using curl: + + curl -H "Authorization: Bearer $ADO_TOKEN" https://dev.azure.com/your_organization/_apis/projects?api-version=7.1 +""" from sk.azure import get_token