Skip to content

Commit d9045e2

Browse files
committed
save test - revert me later
1 parent b46d314 commit d9045e2

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ replace github.com/hashicorp/go-version => github.com/6543/go-version v1.3.1
317317

318318
replace github.com/shurcooL/vfsgen => github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0
319319

320-
replace github.com/nektos/act => gitea.com/gitea/act v0.261.4
320+
replace github.com/nektos/act => gitea.com/badhezi/act v0.0.1
321321

322322
// TODO: the only difference is in `PutObject`: the fork doesn't use `NewVerifyingReader(r, sha256.New(), oid, expectedSize)`, need to figure out why
323323
replace github.com/charmbracelet/git-lfs-transfer => gitea.com/gitea/git-lfs-transfer v0.2.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
1616
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
1717
git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078 h1:cliQ4HHsCo6xi2oWZYKWW4bly/Ory9FuTpFPRxj/mAg=
1818
git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078/go.mod h1:g/V2Hjas6Z1UHUp4yIx6bATpNzJ7DYtD0FG3+xARWxs=
19-
gitea.com/gitea/act v0.261.4 h1:Tf9eLlvsYFtKcpuxlMvf9yT3g4Hshb2Beqw6C1STuH8=
20-
gitea.com/gitea/act v0.261.4/go.mod h1:Pg5C9kQY1CEA3QjthjhlrqOC/QOT5NyWNjOjRHw23Ok=
19+
gitea.com/badhezi/act v0.0.1 h1:lsJL7/BHco3XJyFqI1GJKc0VTX0TPxg/tvsUwAcRiKU=
20+
gitea.com/badhezi/act v0.0.1/go.mod h1:Pg5C9kQY1CEA3QjthjhlrqOC/QOT5NyWNjOjRHw23Ok=
2121
gitea.com/gitea/git-lfs-transfer v0.2.0 h1:baHaNoBSRaeq/xKayEXwiDQtlIjps4Ac/Ll4KqLMB40=
2222
gitea.com/gitea/git-lfs-transfer v0.2.0/go.mod h1:UrXUCm3xLQkq15fu7qlXHUMlrhdlXHoi13KH2Dfiits=
2323
gitea.com/go-chi/binding v0.0.0-20240430071103-39a851e106ed h1:EZZBtilMLSZNWtHHcgq2mt6NSGhJSZBuduAlinMEmso=

services/actions/notifier_helper.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
webhook_module "code.gitea.io/gitea/modules/webhook"
2929
"code.gitea.io/gitea/services/convert"
3030
notify_service "code.gitea.io/gitea/services/notify"
31+
"gopkg.in/yaml.v3"
3132

3233
"github.com/nektos/act/pkg/jobparser"
3334
"github.com/nektos/act/pkg/model"
@@ -299,8 +300,12 @@ func handleWorkflows(
299300
}
300301

301302
for _, dwf := range detectedWorkflows {
303+
var yamlData map[string]any
304+
if err := yaml.Unmarshal([]byte(dwf.Content), &yamlData); err != nil {
305+
log.Fatal(err.Error())
306+
}
302307
run := &actions_model.ActionRun{
303-
Title: strings.SplitN(commit.CommitMessage, "\n", 2)[0],
308+
Title: yamlData["run-name"].(string),
304309
RepoID: input.Repo.ID,
305310
OwnerID: input.Repo.OwnerID,
306311
WorkflowID: dwf.EntryName,

0 commit comments

Comments
 (0)