-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: panic if a step in a job is nil #1145
Conversation
MegaLinter status: ✅ SUCCESS
See errors details in artifact MegaLinter reports on CI Job page |
Codecov Report
@@ Coverage Diff @@
## master #1145 +/- ##
==========================================
+ Coverage 57.50% 60.00% +2.49%
==========================================
Files 32 39 +7
Lines 4594 5000 +406
==========================================
+ Hits 2642 3000 +358
- Misses 1729 1751 +22
- Partials 223 249 +26
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the main problem is found in this function:
Lines 416 to 428 in a76c349
func (s *Step) Type() StepType { | |
if s.Run != "" { | |
if s.Uses != "" { | |
return StepTypeInvalid | |
} | |
return StepTypeRun | |
} else if strings.HasPrefix(s.Uses, "docker://") { | |
return StepTypeUsesDockerURL | |
} else if strings.HasPrefix(s.Uses, "./") { | |
return StepTypeUsesActionLocal | |
} | |
return StepTypeUsesActionRemote | |
} |
It assumes that any type which isn't matched otherwise is a remote action.
I've created #1157 to fix this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
We need to be careful
Closes #1144