Setting Azure DevOps 'All Repositories' Policies via the CLI

The Azure DevOps CLI provides plenty of commands to update Team Projects, but it does not cover all things you might want to set. A good example is setting branch policies. For a given repo you can set the policies using the Azure Repo command eg: az repos policy approver-count update --project <projectname> --blocking true --enabled true --branch main --repository-id <guid> --minimum-approver-count w --reset-on-source-push true --creator-vote-counts false --allow-downvotes false However, you hit a problem if you wish to set the ‘All Repositories’ policies for a Team Project....

November 12, 2021 · 1 min · Richard Fennell

How to fix Azure Pipeline YAML parsing errors seen after renaming the default Git branch

If in Azure DevOps you rename your Git Repo’s default branch, say from ‘master’ to ‘main’, you will probably see an error in the form ‘Encountered error(s) while parsing pipeline YAML: Could not get the latest source version for repository BlackMarble.NET.App hosted on Azure Repos using ref refs/heads/master.’ when you try to manually queue a pipeline run. You could well think, as I did, ‘all I need to do is update the YAML build files with a find and replace for master to main’, but this does not fix the problem....

November 3, 2021 · 1 min · Richard Fennell

New features for my Azure DevOps Release Notes Extension

Over the past couple of weeks, I have shipped three user-requested features for my Azure DevOps Release Notes Extension Generate multiple documents in a single run You can now specify multiple templates and output files. This allows a single instance of the task to generate multiple release note documents with different formats/content. This is useful when the generation of the dataset is slow, but you need a variety of document formats for different consumers....

October 30, 2021 · 2 min · Richard Fennell

The case of the self-cancelling Azure DevOps pipeline

The Issue Today I came across a strange issue with a reasonably old multi-stage YAML pipeline, it appeared to be cancelling itself. The Build stage ran OK, but the Release stage kept being shown as cancelled with a strange error. The strangest thing was it did not happen all the time. I guess this is the reason the problem had not been picked up sooner. If I looked at the logs for the Release stage, I saw that the main job, and meant to be the only job, had completed successfully....

October 29, 2021 · 2 min · Richard Fennell

Automating adding issues to Beta GitHub Projects using GitHub Actions

The new GitHub Issues Beta is a big step forward in project management over what was previously possible with the old ‘simple’ form of Issues. The Beta adds many great features such as: Project Boards/Lists Actionable Tasks Custom Fields including Iterations Automation However, one thing that is not available out the box is a means to automatically add newly created issues to a project. Looking at the automations available within a project you might initially think that there is a workflow to do this job, but no....

October 15, 2021 · 2 min · Richard Fennell