mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 12:48:37 +00:00
workflow_dispatch use workflow from trigger branch (#33098)
* htmx updates the input form on branch switch * add workflow warning to dispatch modal * use name if description of input is empty * show error if workflow_dispatch not available on branch Closes #33073 Closes #33099 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -812,13 +812,8 @@ func Run(ctx *context_module.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// get workflow entry from default branch commit
|
||||
defaultBranchCommit, err := ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultBranch)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
}
|
||||
entries, err := actions.ListWorkflows(defaultBranchCommit)
|
||||
// get workflow entry from runTargetCommit
|
||||
entries, err := actions.ListWorkflows(runTargetCommit)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
|
Reference in New Issue
Block a user