-
Notifications
You must be signed in to change notification settings - Fork 141
refactor: replace getMissingData
action with checkEmptyBranch
#1134
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
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1134 +/- ##
==========================================
+ Coverage 79.62% 81.28% +1.65%
==========================================
Files 59 59
Lines 2479 2458 -21
Branches 289 279 -10
==========================================
+ Hits 1974 1998 +24
+ Misses 461 416 -45
Partials 44 44 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This looks good to me - thank you for taking it on so quickly. One very minor comment and a question.
Co-authored-by: Kris West <[email protected]> Signed-off-by: Juan Escalada <[email protected]>
Co-authored-by: Thomas Cooper <[email protected]> Signed-off-by: Juan Escalada <[email protected]>
This is a solution to some problems identified by @kriswest in #973 after merging in the latest security fixes.
I originally wrote
getMissingData
to solve the problem when making commits from an unapproved branch, in which caseaction.commitData
andaction.user
are empty and must be fetched later. This means the user checks are deferred, and some checks were inadventently skipped as well.To sum it up,
getMissingData
was unsafe, due to mistakenly setting thecommitter
to theauthor_name
which is not always true, and it wasn't actually necessary since Fabio'scheckHiddenCommits
action can handle the edge case mentioned above. I decided to keep only the empty branch check which is still useful and hopefully safe.Changelog
getMissingData
actioncheckEmptyBranch
action to handle missingcommitData
and empty branch identificationparsePush
is quite bloated alreadyparsePush
test for demonstrating thatcommitData == []
on empty branch pushes--delete
commands, but these are not supported yet