Add documentation for wildcard protected branches.
This commit is contained in:
parent
d8475276c4
commit
5de79c4f53
|
@ -23,7 +23,8 @@
|
||||||
= f.label :name, "Branch", class: "label-light"
|
= f.label :name, "Branch", class: "label-light"
|
||||||
= f.text_field(:name)
|
= f.text_field(:name)
|
||||||
%p.help-block
|
%p.help-block
|
||||||
Wildcards such as
|
= link_to "Wildcards", help_page_path(category: 'workflow', file: 'protected_branches', format: 'md', anchor: "wildcard-protected-branches")
|
||||||
|
such as
|
||||||
%code *-stable
|
%code *-stable
|
||||||
or
|
or
|
||||||
%code production/*
|
%code production/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Protected branches
|
# Protected Branches
|
||||||
|
|
||||||
Permissions in GitLab are fundamentally defined around the idea of having read or write permission to the repository and branches.
|
Permissions in GitLab are fundamentally defined around the idea of having read or write permission to the repository and branches.
|
||||||
|
|
||||||
|
@ -28,4 +28,28 @@ For those workflows, you can allow everyone with write access to push to a prote
|
||||||
|
|
||||||
On already protected branches you can also allow developers to push to the repository by selecting the `Developers can push` check box.
|
On already protected branches you can also allow developers to push to the repository by selecting the `Developers can push` check box.
|
||||||
|
|
||||||
![Developers can push](protected_branches/protected_branches2.png)
|
![Developers can push](protected_branches/protected_branches2.png)
|
||||||
|
|
||||||
|
## Wildcard Protected Branches
|
||||||
|
|
||||||
|
>**Note:**
|
||||||
|
This feature was added in GitLab 8.10.
|
||||||
|
|
||||||
|
1. You can specify a wildcard protected branch, which will protect all branches matching the wildcard. For example:
|
||||||
|
|
||||||
|
| Wildcard Protected Branch | Matching Branches |
|
||||||
|
|---------------------------+--------------------------------------------------------|
|
||||||
|
| `*-stable` | `production-stable`, `staging-stable` |
|
||||||
|
| `production/*` | `production/app-server`, `production/load-balancer` |
|
||||||
|
| `*gitlab*` | `gitlab`, `gitlab/staging`, `master/gitlab/production` |
|
||||||
|
|
||||||
|
1. Protected branch settings (like "Developers Can Push") apply to all matching branches.
|
||||||
|
|
||||||
|
1. Two different wildcards can potentially match the same branch. For example, `*-stable` and `production-*` would both match a `production-stable` branch.
|
||||||
|
>**Note:**
|
||||||
|
If _any_ of these protected branches have "Developers Can Push" set to true, then `production-stable` has it set to true.
|
||||||
|
|
||||||
|
1. If you click on a protected branch's name, you will be presented with a list of all matching branches:
|
||||||
|
|
||||||
|
![protected branch matches](protected_branches/protected_branches3.png)
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 190 KiB |
Binary file not shown.
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 40 KiB |
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
Loading…
Reference in New Issue