Skip to content

Instantly share code, notes, and snippets.

@gamerson
Created October 21, 2020 18:50
Show Gist options
  • Save gamerson/3cc9162082b9fe916b2d04b570e251f6 to your computer and use it in GitHub Desktop.
Save gamerson/3cc9162082b9fe916b2d04b570e251f6 to your computer and use it in GitHub Desktop.
webhooks.json
[
{
"id": "lugbot",
"execute-command": "/opt/lugbot-upgrade.sh",
"command-working-directory": "/tmp",
"pass-arguments-to-command":
[
{
"source": "payload",
"name": "repository.owner.login"
},
{
"source": "payload",
"name": "repository.name"
}
],
"trigger-rule": {
"or": [
{
"and": [
{
"match": {
"type": "regex",
"regex": "refs/heads/.*",
"parameter": {
"source": "payload",
"name": "ref"
}
}
},
{
"not": {
"match": {
"type": "value",
"value": "refs/heads/master",
"parameter": {
"source": "payload",
"name": "ref"
}
}
}
},
{
"not": {
"match": {
"type": "value",
"value": "0000000000000000000000000000000000000000",
"parameter": {
"source": "payload",
"name": "after"
}
}
}
},
{
"not": {
"match": {
"type": "regex",
"regex": "refs/heads/lugbot_.*",
"parameter": {
"source": "payload",
"name": "ref"
}
}
}
}
]
},
{
"and": [
{
"match": {
"type": "value",
"value": "open",
"parameter": {
"source": "payload",
"name": "issue.state"
}
}
},
{
"not": {
"match": {
"type": "value",
"value": "lugbot",
"parameter": {
"source": "payload",
"name": "sender.login"
}
}
}
}
]
}
]
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment