Github branch specific pull request template - github

I was wondering if it is possible to create a branch specific pull request template just like I see we have in Azure Repos.
The only thing I could find is global templates for the whole repo but nothing about specific branches.
Any help would be appreciated!

Related

Is it possible to choose pull request templates like issue in github

I have made ISSUE_TEMPLATE and PULL_REQUEST_TEMPLATE in the .github folder and made custom templates for each folder.
In GitHub when I create an Issue, GitHub asks me which issue templates want but not for PR, I need to use the URL parameter.
Is there any way to choose pr templates before writing PR?

azure devops pull request templates: separate template per folder?

I have a repo with a couple different top level folders and would like to know if there's a way to create separate pull request templates for these folders.
For instance, let's say I have:
<repo>
server
client
shared
I want separate pull request templates for each of the categories because there are distinctly different things to ask for in each.
Is it possible to have pull request templates based on paths rather than branches?
Currently, it's not possible to have pull request templates based on paths rather than branches.
The pull request is the collaborative process that lets the rest of the team discuss changes in a branch and agree to merge them once everyone approves. You may try to create branches for each function. For example, create 3 branches from master, branch1 focus on "server" folder, branch2 focus on "client" folder, branch3 focus on "shared" folder. Then create pull requests for each branch.

Are commit templates supported on DevOps?

I know that on Git in general it is possible to enable commit templates by modifying the git config file in the .git-folder. But as these folders are hidden in DevOps is this possible or even recommended in DevOps? If it is doable on DevOps is the process different?
In Git the process should be, modify git config to include:
[commit]
template = ~/.gitmessage
Agree with Tomasz, It is default git behavior, it's not Azure DevOps specific.
As a workaround:
Enable branch policy, it will reject developers push changes directly to the protected branches. Developers need create pull request to push the changes.
Configure pull request template file.
Update repo and create pull request to push changes.
Use pull request template to update the pull request description.
Then we can check it in the commit details.
Result:
It is not possible to edit .git/config file and store it in the remote repo, for everyone to clone it.
You can include instruction in ReadMe on your repo to change a config with
[commit]
template = ~/.gitmessage
once someone clones it.

Automatically removing feature branches on GitHub once they're merged to master

We have over 100 repos which follow the github workflow https://guides.github.com/introduction/flow/. Ideally, when people are merging their code, they'll also click the Delete Branch button, but unfortunately, that step gets missed pretty often. I'm looking for a way to automatically delete branches which have been merged to the master branch. I'm thinking it should either be an organizational level webhook or integrated into our existing Jenkins system. I'm hoping that someone has already written this tool. Anyone?

How can I use pull request name instead of number in TeamCity branch list?

I define branch specification as "+:refs/pull/*/head" and I want to see pull subject instead of pull name.
And is it possible to make link to the github PR from main project page in the TeamCity?
You can connect TeamCity to GitHub through the built-in connector, but I'm not sure that will give you want you want.