Replace `interface{}` with `any`

This commit is contained in:
pangliang 2024-04-17 15:28:32 +08:00
parent 83fb4b0594
commit ea31b78e39
2 changed files with 6 additions and 6 deletions

View File

@ -497,11 +497,11 @@ func (p *PackagePayload) JSONPayload() ([]byte, error) {
// WorkflowDispatchPayload represents a workflow dispatch payload
type WorkflowDispatchPayload struct {
Workflow string `json:"workflow"`
Ref string `json:"ref"`
Inputs map[string]interface{} `json:"inputs"`
Repository *Repository `json:"repository"`
Sender *User `json:"sender"`
Workflow string `json:"workflow"`
Ref string `json:"ref"`
Inputs map[string]any `json:"inputs"`
Repository *Repository `json:"repository"`
Sender *User `json:"sender"`
}
// JSONPayload implements Payload

View File

@ -807,7 +807,7 @@ func Run(ctx *context_module.Context) {
workflow := &model.Workflow{
RawOn: workflows[0].RawOn,
}
inputs := make(map[string]interface{})
inputs := make(map[string]any)
if workflowDispatch := workflow.WorkflowDispatchConfig(); workflowDispatch != nil {
for name, config := range workflowDispatch.Inputs {
value := ctx.Req.PostForm.Get(name)