Skip to content

Commit fc2ec91

Browse files
committed
gitea context
1 parent 6cde283 commit fc2ec91

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

routers/api/actions/runner/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func generateTaskContext(t *actions_model.ActionTask) *structpb.Struct {
6464
log.Error("actions.CreateAuthorizationToken failed: %v", err)
6565
}
6666

67-
gitCtx := actions.GenerateGitContext(t.Job.Run, t.Job)
67+
gitCtx := actions.GenerateGiteaContext(t.Job.Run, t.Job)
6868
gitCtx["token"] = t.Token
6969
gitCtx["gitea_runtime_token"] = giteaRuntimeToken
7070

services/actions/context.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import (
1616
"code.gitea.io/gitea/modules/setting"
1717
)
1818

19-
// GenerateGitContext generate the git context without token and gitea_runtime_token
19+
// GenerateGiteaContext generate the gitea context without token and gitea_runtime_token
2020
// job can be nil when generating context for interpolating workflow-level expressions
21-
func GenerateGitContext(run *actions_model.ActionRun, job *actions_model.ActionRunJob) map[string]any {
21+
func GenerateGiteaContext(run *actions_model.ActionRun, job *actions_model.ActionRunJob) map[string]any {
2222
event := map[string]any{}
2323
_ = json.Unmarshal([]byte(run.EventPayload), &event)
2424

0 commit comments

Comments
 (0)