refactor: replace getMissingData action with checkEmptyBranch#1134
Merged
jescalada merged 13 commits intofinos:mainfrom Aug 7, 2025
Merged
refactor: replace getMissingData action with checkEmptyBranch#1134jescalada merged 13 commits intofinos:mainfrom
getMissingData action with checkEmptyBranch#1134jescalada merged 13 commits intofinos:mainfrom
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:
|
Contributor
Author
kriswest
reviewed
Aug 5, 2025
kriswest
reviewed
Aug 5, 2025
Contributor
kriswest
left a comment
There was a problem hiding this comment.
This looks good to me - thank you for taking it on so quickly. One very minor comment and a question.
coopernetes
reviewed
Aug 5, 2025
Co-authored-by: Kris West <kristopher.west@natwest.com> Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
Co-authored-by: Thomas Cooper <57812123+coopernetes@users.noreply.github.com> Signed-off-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a solution to some problems identified by @kriswest in #973 after merging in the latest security fixes.
I originally wrote
getMissingDatato solve the problem when making commits from an unapproved branch, in which caseaction.commitDataandaction.userare 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,
getMissingDatawas unsafe, due to mistakenly setting thecommitterto theauthor_namewhich is not always true, and it wasn't actually necessary since Fabio'scheckHiddenCommitsaction can handle the edge case mentioned above. I decided to keep only the empty branch check which is still useful and hopefully safe.Changelog
getMissingDataactioncheckEmptyBranchaction to handle missingcommitDataand empty branch identificationparsePushis quite bloated alreadyparsePushtest for demonstrating thatcommitData == []on empty branch pushes--deletecommands, but these are not supported yet