summaryrefslogtreecommitdiffstats
path: root/services/actions
diff options
context:
space:
mode:
authorDenys Konovalov <kontakt@denyskon.de>2023-12-29 07:18:57 +0100
committerGitHub <noreply@github.com>2023-12-29 07:18:57 +0100
commitf10d716ff4fef78fbddbd5eaeae48e7c10384a99 (patch)
tree8754886153e449448fb4bb480f83b77c9e03d472 /services/actions
parentImprove 1.22 document for Database Preparation (#28643) (diff)
downloadforgejo-f10d716ff4fef78fbddbd5eaeae48e7c10384a99.tar.xz
forgejo-f10d716ff4fef78fbddbd5eaeae48e7c10384a99.zip
fix empty ref for cron workflow runs (#28640)
Fix #27678 Please see https://github.com/go-gitea/gitea/issues/27678#issuecomment-1871445853 for details.
Diffstat (limited to 'services/actions')
-rw-r--r--services/actions/notifier_helper.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/actions/notifier_helper.go b/services/actions/notifier_helper.go
index 175b8a4118..705661ae7a 100644
--- a/services/actions/notifier_helper.go
+++ b/services/actions/notifier_helper.go
@@ -195,7 +195,7 @@ func notify(ctx context.Context, input *notifyInput) error {
}
}
- if err := handleSchedules(ctx, schedules, commit, input); err != nil {
+ if err := handleSchedules(ctx, schedules, commit, input, ref); err != nil {
return err
}
@@ -399,6 +399,7 @@ func handleSchedules(
detectedWorkflows []*actions_module.DetectedWorkflow,
commit *git.Commit,
input *notifyInput,
+ ref string,
) error {
branch, err := commit.GetBranchName()
if err != nil {
@@ -448,7 +449,7 @@ func handleSchedules(
OwnerID: input.Repo.OwnerID,
WorkflowID: dwf.EntryName,
TriggerUserID: input.Doer.ID,
- Ref: input.Ref,
+ Ref: ref,
CommitSHA: commit.ID.String(),
Event: input.Event,
EventPayload: string(p),