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.
Related
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!
I wish to grab the content from a PR description through github.event.pull_request.body and have the data there stored in a separate repo than the one the action is running on.
So can a Github Action write to a file/create a file in a separate repo than the one it is running in?
I want to automatically merge commits from master into another parallel branch which is used for different deployment strategy. So essentially whenever there is a change in master I want that change to be merged into one more branch automatically.
Is there a way in Github UI to do so?
Github does support automerge, but only for Pull Request.
You might check out a GitHub Action like action-automerge
GitHub action to automatically merge the source branch into a target branch every time a change is made.
You can add a GitHub Action workflow to your project in order to enable that "action-automerge".
That being said, maybe you have other approaches which would be simpler than merging master/main. Using the same branch but with a deployment script able to detect its execution environment would be easier.
I have a VSTS/Azure DevOps project with a git repository containing different customer branches. I would like to permit each customer to read-only their own branch. How can I achieve this?
The access control settings do not allow me to set read permissions on specific branches, only on entire repositories. So is it perhaps possible to have a separate repository for each customer that automatically mirrors just the corresponding branch in the master repository?
You can't specify the permission directly in branches (branch level). However, you can inherit/modify the permissions from the repo level to branch level.
See my similar answer here
As you stated in your question. You should create separate repos for different customer where you can control the permissions.
I have an iOS that app that I need to deploy to several clients. Each clients has a few small changes in the app (images, provisioning files, app name, etc). 95% of the app is the same for all clients.
I don't want to maintain several git repositories (one for each client). I would rather have the once, with branches for each customer.
I'm new to this branching thing and need to know if this can be achieved.
I plan to create the master branch with generic images/configs/etc.
Create a branch for each client
Update each branch with the customers images/configs/etc
Then when I make a change I will make it to the master. Then pull the changes from the master to each branch. How can I stop the images, configs, etc from being overridden when I pull from master. Can I define certain files which can be ignored when I do this for each branch?
Is there a better way of managing what I need to do?
You should pull master and then rebase your branches on top of it.
See "Git: How to rebase many branches (with the same base commit) at once?" for a concrete example.
For extra security, you can add a merge driver "keepMine" associated for your files, and declare that merge driver in a .gitattributes file present in each of your branches.
See "How do I tell git to always select my local version for conflicted merges on a specific file?".
That will change the SHA1 of your client branches, and you will have to force push them to the client repo, but since said clients aren't actively modifying files on their side, it isn't a problem.