3
votes

I am developing a service hook extension for Azure DevOps that is loosely based on the sample provided on https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-service-hook?view=azure-devops

I cannot find any documentation on the available actions. For example, the sample provides a sample consumer with an action of publishEvent but there is no reference material on this.

Could someone please point me toward any reference documentation that might exist?

1
Maybe this document can make some help for you? Feel free to let me know if it's not helpful :)LoLance
I don't believe this was what I needed. How does one, for example, make a HTTP POST with a custom content as the action on a serviceHook event?user3475441
@LanceLi-MSFT i fear this is not really helpful. I cannot find any documentation about custom service hooks, beside the sample from the question.Tobias Theel

1 Answers

1
votes

It's only supported to send standard event payload with custom service hooks for now. In the sample, you can see the action defined as below:

        "actions": [
            {
                "id": "performAction",
                "name": "Perform action",
                "description": "Posts a standard event payload",
                "supportedEventTypes": [
                    "git.push",
                    "git.pullrequest.created",
                    "git.pullrequest.updated"
                ],
                "publishEvent": {
                    "url": "{{{url}}}",
                    "resourceDetailsToSend": "all",
                    "messagesToSend": "all",
                    "detailedMessagesToSend": "all"
                }
            }
        ]

With this setting, it will send all the payload about the trigger event to the URL you configured. And you can configure how much of the information to send:

resourceDetailsToSend - all, minimal, none
messagesToSend - all, text, html, markdown, none
detailedMessagesToSend - all, text, html, markdown, none