Summary
Parses the message of a merge commit to extract the merged branch name, target branch, pull-request number, and embedded semantic version.
- Assembly
- GitVersion
.Core .dll - Namespace
- GitVersion
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type["MergeMessage"]
class Type type-node
Syntax
public class MergeMessage
Attributes
| Type | Description |
|---|---|
| Nullable |
|
| NullableAttribute |
Constructors
| Name | Summary |
|---|---|
| MergeMessage | Parses mergeMessage using the configured and built-in merge message formats. |
Properties
| Name | Value | Summary |
|---|---|---|
| FormatName | string |
Gets the name of the merge message format pattern that was matched, or
null if none matched. |
| IsMergedPullRequest | bool |
Gets a value indicating whether this merge message represents a merged pull request.
|
| MergedBranch | ReferenceName |
Gets the reference name of the branch that was merged in, or
null if not captured. |
| PullRequestNumber | Nullable |
Gets the pull-request number extracted from the merge message, or
null if this is not a pull-request merge. |
| TargetBranch | string |
Gets the name of the branch that was the merge target, or
null if not captured. |
| Version | SemanticVersion |
Gets the semantic version embedded in the merged branch name, or
null if none was found. |
Methods
| Name | Value | Summary |
|---|---|---|
| TryParse |
bool |
Attempts to parse a valid merge message from mergeCommit, setting mergeMessage when successful.
static
|
Extension Methods
| Name | Value | Summary |
|---|---|---|
| NotNull |
T |
Throws
System.ArgumentNullException when value is null; otherwise returns the value.From CommonExtensions
|