You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preface, a plugin system would potentially be nicer, but also more complicated. I've opted to open this proposal to see if there is interest.
I'm in the beginning stages of working out how an external command could work.
In my opinion this could cover a vast majority of cases, as the command could also do any data processing and HTTP calls as necessary.
name: custom-py# Not sure if this should be a local path or URL. If local, Gitea needs a way to serve it e.g. in the custom/img folderimage: /path/to/image.png command: [python, /usr/local/bin/custom.py]form:
- title: Channel IDhelp: The channel to post torequired: true
Things inside form would be used by Gitea to present the webhook form. Probably by transforming the title e.g. channel_id from above.
I'm thinking the current giteaJSON payload could be sent to the command via stdin.
I'm not 100% sure how to pass along form inputs, perhaps an enclosing JSON object ?
{
"form": {...},
"payload": {...}
}
Then the command can unmarshal the JSON and do whatever it needs to.
The text was updated successfully, but these errors were encountered:
This seems like a potential solution - of course windows users will cause no limit of trouble.
If we do this - do not use exec.Command but rather extend the modules/process/manager.go to have a nicer Exec that will take a readers and write to writers. Then the process becomes cancellable from the admin page etc.
Related to #1089
Preface, a plugin system would potentially be nicer, but also more complicated. I've opted to open this proposal to see if there is interest.
I'm in the beginning stages of working out how an external command could work.
In my opinion this could cover a vast majority of cases, as the command could also do any data processing and HTTP calls as necessary.
Things inside
form
would be used by Gitea to present the webhook form. Probably by transforming thetitle
e.g.channel_id
from above.I'm thinking the current
gitea
JSON payload could be sent to thecommand
viastdin
.I'm not 100% sure how to pass along form inputs, perhaps an enclosing JSON object ?
Then the
command
can unmarshal the JSON and do whatever it needs to.The text was updated successfully, but these errors were encountered: