ブランチ権限のパターン
Bitbucket Data Center and Server supports a powerful type of pattern syntax for matching branch names (similar to pattern matching in Apache Ant). You can use branch permission patterns when adding branch permissions at the project or repository level to apply a branch permission to multiple branches.
関連ページ
これらの式では、次のワイルド カードを使用できます。
? | 1 つ以上の文字 (パス区切り記号以外の文字) と一致 |
* | 0 個以上の文字と一致 (パス区切り記号を含まない) |
** | 0 個以上のパス セグメントと一致 |
Pattern used in branch permissions match against all refs pushed to Bitbucket (i.e. branches and tags).
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-* | Matches any branch or tag named PROJECT-*, even in a name space. 例: 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 |