Can I create a pull request template that is shared across our repositories? - azure-devops

We have several products developed in each their repositories. We use Azure DevOps for pull requests. We have a Pull Request template that we wish to use on all repositories, hopefully maintaining in a single spot.
Is that possible and how?

Related

How do I track a public repository/ organisation's progress on Github?

I want to track some projects hosted publicly on GitHub by others and export metrics such as the number of commits, pr merges, and issues resolved to a CSV document periodically.
I've read the GitHub docs to figure out a way to use the API to extract data, but as per my understanding, the API is for tracking projects hosted by the owner only. Any help?

How can I associate a PR with a work item in a different subscription

My distributed team works in two different subscriptions, lets call them
sub1.visualstudio.com and sub2.visualstudio.com. It's not practical to add them as a team in our company account, as suggested here: Can I link a pull request to a work item in a different VSTS account?
Our repo is in sub1.visualstudio.com, but the other team keeps its work items in sub2.visualstudio.com
How can I associate a work item in sub2.visualstudio.com with my PR's in sub1.visualstudio.com?
Alternatively, Is there any way to mirror work items between two subscriptions with some kind of bot connector or something?
afaik, it is not possible to connect PR from one subscription to a WI in another. The only way to link them would be by adding an external hyperlink.
The are a few options to replicate your workitems. For example, one would be to use a Logic App in Azure which will be triggered automatically on update/create etc... The other way would be to use, for example azure-devops-migration-tools and create a schedule.

Is it possible to create a global workflow for GitHub actions?

I am managing several projects using GitHub actions.
Every repository consist of several workflows which happens on push to branches and on pull requests. Keeping all this configuration (even when sharing actions) is hard.
Is it possible to create and use one global workflow for an event?

GitHub API - Equivalent of GitLab's Protected branch API

There is a feature named Protected branches API on GitLab API. Basically, you can restrict all the push and merge access by setting their levels to 0.
I have checked Branches section on GitHub REST API document but I couldn't find the equivalent API. How can I restrict merge and push to a branch on GitHub? Also, I want to remove this restriction after some operations.
protect master branch (do not allow any push, merge etc.)
do something
unprotect master branch
Going to the github api documentation, I see they have added protections. This seems pretty clear how to add proctections using API now.
I don't know a way using the API, but in the UI, you can go to settings > branches and then add some protection rules
You can read more about it here

GitHub REST API: Commits per release

I'm trying to obtain the commits that were included on an specific release, on a repository that uses tags to identify releases. According to this answer, this doable through git log.
However, I need to gather this information for several repositories, so using an API is more convenient. Is it possible to get that information from GitHub's REST API?
You can use the compare two commits API:
GET /repos/:owner/:repo/compare/:base...:head
This is the same as locally running git log base..head.
Given that you want to automate this for several repos check List your Repositories API as well
Let me know if you need more info.