Fossil User Forum

Publish Ticket Updates/Commits to Webhook from Fossil TH1
Login

Publish Ticket Updates/Commits to Webhook from Fossil TH1

Publish Ticket Updates/Commits to Webhook from Fossil TH1

(1) By jam on 2019-01-24 18:32:44 [source]

(Posted this on Stackoverflow and had some helpful responses but haven't had any luck so I thought I'd try here)

I'm currently trying to setup Discord(or Slack-like) webhooks with my Fossil Repo running 2.6

I'm following this documentation:

Fossil TH1 Docs

Discord Webhook Docs

Here's an example of what I'm trying to run in the raw TH1 requests:

http -asynchronous https://discordapp.com/api/webhooks/443395012672094208/(redacted) {{content: 'hello there'}}

Which I'm hoping for it to look something like this(I did this in Postman separately) Image

However I get no response and there's not much room for debugging on Fossil. I wasn't sure exactly how to format the payload. I tried "stringifying" it as well. Synchronous requests to see the HTTP response are not yet implemented so I cannot take off the flag.

I have my TH1 Regexp setup as follows(it throws no error about unacceptable URI anymore): Image 2

(2) By anonymous on 2019-01-27 10:07:27 in reply to 1 [link] [source]

As I recall, Fossil has to built with an option to enable the TH1 hooks. Otherwise, the only TH1 scripts that run are the ones that support Fossil's web-based UI.

I suppose you could test your TH1 code by inserting in the new ticket and edit ticket under ticket setup under the admin page.

(3) By anonymous on 2019-02-05 14:24:55 in reply to 1 [link] [source]

Where you able to get this to work?

If so, what did you need to do?

(4) By jam on 2019-10-17 18:32:12 in reply to 3 [link] [source]

I think the problem is this " If a payload is present, it will be interpreted as text/plain and the POST method will be used". I think it expects "application/json" or "multipart/form-data". Not sure if there's anything we can do.

(5) By mistachkin on 2019-10-18 18:53:57 in reply to 4 [link] [source]

For this kind of extensibility, you might want to consider compiling Fossil with native Tcl support and using its http package.