This commit is contained in:
silverwind
2026-02-24 08:17:17 +01:00
parent 4fdf9ab904
commit b0ec3fa4fc
34 changed files with 94 additions and 101 deletions

View File

@@ -91,8 +91,10 @@ func withDefaultBranch(ctx context.Context, b string, event map[string]any) map[
return event
}
var findGitRef = git.FindGitRef
var findGitRevision = git.FindGitRevision
var (
findGitRef = git.FindGitRef
findGitRevision = git.FindGitRevision
)
func (ghc *GithubContext) SetRef(ctx context.Context, defaultBranch string, repoPath string) {
logger := common.Logger(ctx)

View File

@@ -612,7 +612,7 @@ func (s *Step) GetEnv() map[string]string {
func (s *Step) ShellCommand() string {
var shellCommand string
//Reference: https://github.com/actions/runner/blob/8109c962f09d9acc473d92c595ff43afceddb347/src/Runner.Worker/Handlers/ScriptHandlerHelpers.cs#L9-L17
// Reference: https://github.com/actions/runner/blob/8109c962f09d9acc473d92c595ff43afceddb347/src/Runner.Worker/Handlers/ScriptHandlerHelpers.cs#L9-L17
switch s.Shell {
case "":
shellCommand = "bash -e {0}"

View File

@@ -395,7 +395,7 @@ func TestReadWorkflow_Strategy(t *testing.T) {
func TestMatrixOnlyIncludes(t *testing.T) {
matrix := map[string][]any{
"include": []any{
"include": {
map[string]any{"a": "1", "b": "2"},
map[string]any{"a": "3", "b": "4"},
},