Skip to content

Commit

Permalink
Replace interface{} with any
Browse files Browse the repository at this point in the history
  • Loading branch information
pangliang committed Apr 17, 2024
1 parent 83fb4b0 commit ea31b78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions modules/structs/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion routers/web/repo/actions/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ea31b78

Please sign in to comment.