You are reviewing a webhook payload from Azure Repos. The payload indicates that a new branch named 'feature-123' was created. Which event type triggered this webhook?
Exhibit
Refer to the exhibit.
```json
{
"branch": "refs/heads/feature-123",
"before": "0000000000000000000000000000000000000000",
"after": "abc123def456abc123def456abc123def456abc1",
"commits": [
{
"id": "abc123def456abc123def456abc123def456abc1",
"message": "Add new feature"
}
]
}
```Trap 1: A push to an existing branch.
For an existing branch push, both 'before' and 'after' are non-zero commit hashes because the ref already exists and is updated from a previous commit to a new commit, so an all-zero 'before' is not present.
Trap 2: A branch deletion.
A branch deletion is the opposite pattern: 'after' is all zeros because the ref is removed, while 'before' holds the last commit hash of the deleted branch, so it does not match the all-zero 'before' condition.
Trap 3: A pull request update.
Pull request updates are delivered as a separate webhook event type with a different payload structure (pullRequest and resource objects), not the push event's before/after ref fields, so they cannot indicate a new branch creation.
- A
A new branch creation.
In Azure Repos webhook push events, 'before' is all zeros because there is no prior commit on the new ref; the 'after' contains the first commit hash, uniquely identifying a new branch creation.
- B
A push to an existing branch.
Why wrong: For an existing branch push, both 'before' and 'after' are non-zero commit hashes because the ref already exists and is updated from a previous commit to a new commit, so an all-zero 'before' is not present.
- C
A branch deletion.
Why wrong: A branch deletion is the opposite pattern: 'after' is all zeros because the ref is removed, while 'before' holds the last commit hash of the deleted branch, so it does not match the all-zero 'before' condition.
- D
A pull request update.
Why wrong: Pull request updates are delivered as a separate webhook event type with a different payload structure (pullRequest and resource objects), not the push event's before/after ref fields, so they cannot indicate a new branch creation.