{
    "additionalProperties": false,
    "definitions": {
        "git": {
            "additionalProperties": false,
            "properties": {
                "commit": {
                    "maxLength": 100,
                    "title": "Git SHA Commit ID",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "owner": {
                    "maxLength": 100,
                    "title": "Owner/Organization of the SCM repository (e.g. totem)",
                    "type": "string"
                },
                "ref": {
                    "maxLength": 100,
                    "title": "Branch or tag name",
                    "type": "string"
                },
                "repo": {
                    "maxLength": 100,
                    "title": "SCM repository name (e.g.: spec-python)",
                    "type": "string"
                }
            },
            "required": [
                "owner",
                "repo",
                "ref"
            ]
        }
    },
    "properties": {
        "force-deploy": {
            "description": "Force deploy the image on receiving this hook (ignore status)",
            "type": "boolean"
        },
        "git": {
            "$ref": "#/definitions/git"
        },
        "name": {
            "description": "Name of the hook (e.g. image-factory)",
            "maxLength": 100,
            "type": "string"
        },
        "result": {
            "description": "Result object",
            "type": "object"
        },
        "status": {
            "description": "Status for the hook (failed, success)",
            "enum": [
                "success",
                "failed"
            ]
        },
        "type": {
            "description": "Type of the hook (e.g. builder, ci)",
            "enum": [
                "builder",
                "ci",
                "scm-create",
                "scm-push"
            ]
        }
    },
    "required": [
        "name",
        "type",
        "git"
    ],
    "title": "Schema for Generic Hook payload",
    "type": "object"
}