forked from kevadesu/forgejo
Fixes git references wrongly transmitted to the action run
This commit is contained in:
parent
9634d954d4
commit
9b225b56a9
3 changed files with 25 additions and 1 deletions
|
@ -141,6 +141,11 @@ func (entry *Workflow) Dispatch(ctx context.Context, inputGetter InputValueGette
|
|||
}
|
||||
|
||||
func GetWorkflowFromCommit(gitRepo *git.Repository, ref, workflowID string) (*Workflow, error) {
|
||||
ref, err := gitRepo.ExpandRef(ref)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
commit, err := gitRepo.GetCommit(ref)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue