-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Wip require action feature fail post #30067
Wip require action feature fail post #30067
Conversation
2eae9a4
to
1136088
Compare
2024/04/06 14:19:45 ...eb/routing/logger.go:102:func1() [I] router: completed POST /org/SUSE/settings/actions/require_action/add for [::1]:62841, 400 Bad Request in 9.4ms @ setting/require_action.go:73(setting.RequireActionCreate) |
Please fix all the lint errors and run |
Signed-off-by: Alex Lau(AvengerMoJo) <[email protected]>
Signed-off-by: Alex Lau(AvengerMoJo) <[email protected]>
e88e9ad
to
b7ef3f2
Compare
Signed-off-by: Alex Lau(AvengerMoJo) <[email protected]>
…rror. Signed-off-by: Alex Lau(AvengerMoJo) <[email protected]>
6cfbad2
to
c10d144
Compare
Signed-off-by: Alex Lau(AvengerMoJo) <[email protected]>
@silverwind I fixed up the fmt and added the delete function. So currently you can enable a workflow in the repo to the org global level. Then you can add it into the RequireAction table in the Org->Setting->Actions->RequireAction. |
require_action.workflow = Workflow Filename | ||
require_action.link = Link | ||
require_action.remove = Remove | ||
require_action.none = No Require Actions Available. |
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.
require_action.none = No Require Actions Available. | |
require_action.none = No Required Actions Available. |
}); | ||
}); | ||
}); | ||
</script> |
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.
This script should be in web_src/js
and if necessary detect with a fast selector like document.getElementById('add-require-actions-modal')
whether this modal is present, and if not abort.
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.
@silverwind does the following make sense? I'm not sure it should be in features or components.
I am also wondering there is any default function allows me to disable and enable the rest of the input based on the selected radio button like what I am trying to do.
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.
features
is fine, we pile everything into it currently.
Regarding the other question: I'm not sure but please check how it's done on the repo settings page. There is some mechanism there that enables/disables a bunch of fields when radio buttons are clicked.
Signed-off-by: Alex Lau(AvengerMoJo) <[email protected]>
Signed-off-by: Alex Lau(AvengerMoJo) <[email protected]>
@silverwind I may need a bit help with the way global require action implementation after being enable . |
main...AvengerMoJo:gitea:wip_require_action @silverwind if you could try the above wip branch has a implementation of the RequireAction. The usage and screen capture of steps are located #26666. |
#31869 replace this PR |
Still a WIP branch and try to implement the #26666
In the earlier commit main...AvengerMoJo:gitea:wip_require_action_feature
I create a table to allow repo workflow to enable as global (org) visible action.
However when I create a form to POST call to try creating the table to keep track of all the require action. Either the repo/setting/actions/require_action/add or repo/setting/actions/require_action in routers/web/web.go able to work. I get 405 or bad request.
Need some tips to connect the bot for my POST request,
web/repo/setting/actions/require_action interface
from templates/shared/actions/require_action_list.tmpl click the add button calling
routes/web/repo/setting/require_action
RequireActionsCreate call shared action
then
from service/actions/require_action
CreateRequireAction call InsertRequireAction in
the model/actions/require_action