backmeupplz / ci-ninja

CI service written in node
MIT License
67 stars 12 forks source link

Gogs support #11

Open yeleleo opened 10 months ago

yeleleo commented 10 months ago

Thank you for your work!

Any chance you can add Gogs hooks support? https://gogs.io

Or maybe it has an option to receive hooks on a script-alike urls? http://{server-ip}:61439/repo-branch ?

Currently Gogs is showing error:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>SyntaxError: Unexpected token u in JSON at position 0<br> &nbsp; &nbsp;at JSON.parse (&lt;anonymous&gt;)<br> &nbsp; &nbsp;at /index.js:23:24<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at next (/node_modules/express/lib/router/route.js:137:13)<br> &nbsp; &nbsp;at Route.dispatch (/node_modules/express/lib/router/route.js:112:3)<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at /node_modules/express/lib/router/index.js:281:22<br> &nbsp; &nbsp;at Function.process_params (/node_modules/express/lib/router/index.js:335:12)<br> &nbsp; &nbsp;at next (/node_modules/express/lib/router/index.js:275:10)<br> &nbsp; &nbsp;at urlencodedParser (/node_modules/body-parser/lib/types/urlencoded.js:82:7)</pre>
</body>
</html>
backmeupplz commented 10 months ago

hm, probably worth rewriting the whole thing anyway, it should be like 10 lines of code after the rewrite

yeleleo commented 10 months ago

I (and community) would really appreciate the version which support Gogs hooks! Thanks