Only trigger the build if received message passes all the checks specified.
Each check consists of field / expected value pair. To pass the check, the value extracted from a received message using JsonPath must match the regular expression specified by the "expected value".
Consider a message body of:
{
"commit":
{
"username": "hadess",
"stats":
{
"files":
{
"0001-comics-Remove-support-for-tar-and-tar-like-commands.patch":
{
"deletions": 0,
"additions": 227,
"lines": 227
},
"evince.spec":
{
"deletions": 1,
"additions": 7,
"lines": 8
}
},
"total":
{
"deletions": 1,
"files": 2,
"additions": 234,
"lines": 235
}
},
"name": "Bastien Nocera",
"rev": "743c528abd1e817b34e5736e16a2b2f4d6d44e9a",
"namespace": "rpms",
"agent": "hadess",
"summary": "+ evince-3.20.1-3",
"repo": "evince",
"branch": "f26",
"seen": false,
"path": "/srv/git/repositories/rpms/evince.git",
"message": "+ evince-3.20.1-3\nResolves: #1468488\n",
"email": "hadess@hadess.net"
}
}
To check if branch is f26, you would specify the field and expected value as:
$.commit.branchf26