mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
fix function name in comment (#2240)
Signed-off-by: thirdkeyword <fliterdashen@gmail.com> (cherry picked from commit 71ae39085eb9ed060ac55b45e55147489faaefa2)
This commit is contained in:
parent
f147e45da3
commit
2110aed6c7
3 changed files with 4 additions and 4 deletions
|
@ -367,7 +367,7 @@ func environment(yml yaml.Node) map[string]string {
|
||||||
return env
|
return env
|
||||||
}
|
}
|
||||||
|
|
||||||
// Environments returns string-based key=value map for a job
|
// Environment returns string-based key=value map for a job
|
||||||
func (j *Job) Environment() map[string]string {
|
func (j *Job) Environment() map[string]string {
|
||||||
return environment(j.Env)
|
return environment(j.Env)
|
||||||
}
|
}
|
||||||
|
@ -604,7 +604,7 @@ func (s *Step) String() string {
|
||||||
return s.ID
|
return s.ID
|
||||||
}
|
}
|
||||||
|
|
||||||
// Environments returns string-based key=value map for a step
|
// Environment returns string-based key=value map for a step
|
||||||
func (s *Step) Environment() map[string]string {
|
func (s *Step) Environment() map[string]string {
|
||||||
return environment(s.Env)
|
return environment(s.Env)
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ func (rc *RunContext) NewExpressionEvaluatorWithEnv(ctx context.Context, env map
|
||||||
//go:embed hashfiles/index.js
|
//go:embed hashfiles/index.js
|
||||||
var hashfiles string
|
var hashfiles string
|
||||||
|
|
||||||
// NewExpressionEvaluator creates a new evaluator
|
// NewStepExpressionEvaluator creates a new evaluator
|
||||||
func (rc *RunContext) NewStepExpressionEvaluator(ctx context.Context, step step) ExpressionEvaluator {
|
func (rc *RunContext) NewStepExpressionEvaluator(ctx context.Context, step step) ExpressionEvaluator {
|
||||||
// todo: cleanup EvaluationEnvironment creation
|
// todo: cleanup EvaluationEnvironment creation
|
||||||
job := rc.Run.Job()
|
job := rc.Run.Job()
|
||||||
|
|
|
@ -52,7 +52,7 @@ func Masks(ctx context.Context) *[]string {
|
||||||
return &[]string{}
|
return &[]string{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithLogger adds a value to the context for the logger
|
// WithMasks adds a value to the context for the logger
|
||||||
func WithMasks(ctx context.Context, masks *[]string) context.Context {
|
func WithMasks(ctx context.Context, masks *[]string) context.Context {
|
||||||
return context.WithValue(ctx, masksContextKeyVal, masks)
|
return context.WithValue(ctx, masksContextKeyVal, masks)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue