-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Support workflow event dispatch via API #33545
Feature: Support workflow event dispatch via API #33545
Conversation
ref: go-gitea#31765 --------- Signed-off-by: Bence Santha <git@santha.eu> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree your Locale Wrap approach looks better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have added the nil check in the callback to have the opportunity to later reject inputs not defined for the workflow, but since this is not implemented removing this is ok
Hmm, I thought that we could reject the inputs in the outer caller function, then no need to check nil in every "processInputs" callback. Does it seem good? |
Yes we can do it like this, if we set all values into the map provided to the function. Just had different thoughts in my mind this is fine. Another open detail I left behind has been case insensitivity of inputs. Technically is should be ok to pass |
I just tested github.com, they are ignoring Gitea ignores json if this header is found gh cli also converts form to json on the fly before making the call |
c41a613
to
54ffed2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* giteaofficial/main: Enhance routers for the Actions runner operations (go-gitea#33549) [skip ci] Updated translations via Crowdin Run yamllint with strict mode, fix issue (go-gitea#33551) Enhance routers for the Actions variable operations (go-gitea#33547) enhancement: add additional command hints for PowerShell & CMD (go-gitea#33548) Feature: Support workflow event dispatch via API (go-gitea#33545) Optimize the dashboard (go-gitea#32990) Rework suggestion backend (go-gitea#33538) Revert "Feature: Support workflow event dispatch via API (go-gitea#32059)" (go-gitea#33541)
Fix: #31765 (Re-open #32059)
Major changes after #32059
workflowID != ""
check because the path param can't be empty if the handler has been routed to.Co-authored-by: Bence Santha git@santha.eu
Co-authored-by: Christopher Homberger christopher.homberger@web.de