1
1
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:
ChristopherHX
2025-01-05 14:47:18 +01:00
committed by GitHub
parent 3078826d01
commit 4237736029
6 changed files with 189 additions and 122 deletions

View File

@@ -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