ブランチ権限のパターン
Bitbucket Server は、ブランチ名を照合する強力なタイプのパターン構文をサポートします (Apache Ant のパターン マッチと同様)。プロジェクトまたはリポジトリ レベルでブランチ権限を追加する際に、ブランチ権限パターンを使用して、ブランチ権限を複数のブランチに適用できます。
これらの式では、次のワイルド カードを使用できます。
? | 1 つ以上の文字 (パス区切り記号以外の文字) と一致 |
* | 0 個以上の文字と一致 (パス区切り記号を含まない) |
** | 0 個以上のパス セグメントと一致 |
ブランチ権限で使用されるパターンは、Bitbucket Server にプッシュされるすべての ref (ブランチとタグ) を照合します。
In Git, branch and tag names can be nested in a namespace by using directory syntax within your branch names, e.g. stable/1.1
. The '**
' wild card selector enables you to match arbitrary directories.
- パターンにはワイルド カードをいくつでも含めることができます。
- If the pattern ends with
/
then**
is automatically appended - e.g.foo/
will match any branches or tags containing afoo
path segment - Patterns only need to match a suffix of the fully qualified branch or tag name. Fully qualified branch names look like
refs/heads/master
, while fully qualified tags look likerefs/tags/1.1
.
Ant ドキュメントも参照してください。
例
* | すべてと一致します。 |
PROJECT-* | 名前空間内であっても、"PROJECT-*" という名前のブランチまたはタグを照合します。 例: refs/heads/PROJECT-1234、refs/heads/stable/PROJECT-new or refs/tags/PROJECT-1.1 |
?.? | "," で区切られた 2 文字のブランチまたはタグを照合します。 例: refs/heads/1.1、refs/heads/stable/2.X or refs/tags/3.1 |
tags/ または tags/** | 名前空間に "tag" を持つすべてのタグとブランチを照合します。 例: refs/heads/stable/tags/some_branch、refs/tags/project-1.1.0 |
heads/**/master | master と呼ばれるすべてのブランチを照合します。 例: refs/heads/master、refs/heads/stable/master |