Skip to content

Commit

Permalink
Merge pull request #36 from LukaszSielski/extract_commons
Browse files Browse the repository at this point in the history
test
  • Loading branch information
LukaszSielski authored Sep 19, 2024
2 parents d3eb50b + c8b9a9b commit 9834eb1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/az_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
class AzCli:

def tag_work_items(self, work_items_ids: list[str], tag: str) -> None:
update_result = {}
for work_item_id in work_items_ids:
print(f'Trying to tag {work_item_id} with tag {tag}')
try:
check_output(f'az boards work-item update --id {work_item_id} --org https://dev.azure.com/lukaszadamsielski0187 --fields "System.Tags={tag}"', shell=True, stderr=STDOUT)
update_result.update({work_item_id: 'Success'})
print(f'Successfully updated work item {work_item_id} with tag {tag}')
except CalledProcessError as e:
print(f"Update process failed for {work_item_id}, error: {e}")
update_result.update({work_item_id: e.output})
print(update_result)
print(f"Update process failed for {work_item_id}, error: {e.output}")

0 comments on commit 9834eb1

Please sign in to comment.