diff options
author | Earl Warren <contact@earl-warren.org> | 2024-02-05 16:53:39 +0100 |
---|---|---|
committer | Earl Warren <contact@earl-warren.org> | 2024-02-05 16:53:39 +0100 |
commit | f7fd1c7c86e4c79a99d5b18c4062d2b1d2030134 (patch) | |
tree | 8e905059aba74539d3932698e82c387a6e8fbc80 /modules/actions | |
parent | [GITEA] Don't consider orphan branches as recently pushed (diff) | |
download | forgejo-f7fd1c7c86e4c79a99d5b18c4062d2b1d2030134.tar.xz forgejo-f7fd1c7c86e4c79a99d5b18c4062d2b1d2030134.zip |
Revert "Fix an actions schedule bug (#28942)"
This reverts commit adc3598a755b43e3911266d7fa575c121e16613d.
Diffstat (limited to 'modules/actions')
-rw-r--r-- | modules/actions/workflows.go | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/modules/actions/workflows.go b/modules/actions/workflows.go index 382338c957..8a44e9dbe2 100644 --- a/modules/actions/workflows.go +++ b/modules/actions/workflows.go @@ -149,41 +149,6 @@ func DetectWorkflows( return workflows, schedules, nil } -func DetectScheduledWorkflows(gitRepo *git.Repository, commit *git.Commit) ([]*DetectedWorkflow, error) { - entries, err := ListWorkflows(commit) - if err != nil { - return nil, err - } - - wfs := make([]*DetectedWorkflow, 0, len(entries)) - for _, entry := range entries { - content, err := GetContentFromEntry(entry) - if err != nil { - return nil, err - } - - // one workflow may have multiple events - events, err := GetEventsFromContent(content) - if err != nil { - log.Warn("ignore invalid workflow %q: %v", entry.Name(), err) - continue - } - for _, evt := range events { - if evt.IsSchedule() { - log.Trace("detect scheduled workflow: %q", entry.Name()) - dwf := &DetectedWorkflow{ - EntryName: entry.Name(), - TriggerEvent: evt, - Content: content, - } - wfs = append(wfs, dwf) - } - } - } - - return wfs, nil -} - func detectMatched(gitRepo *git.Repository, commit *git.Commit, triggedEvent webhook_module.HookEventType, payload api.Payloader, evt *jobparser.Event) bool { if !canGithubEventMatch(evt.Name, triggedEvent) { return false |