Skip to content
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

🌱 refactor: reorder functions to enhance readability #3880

Conversation

diogoteles08
Copy link
Contributor

This is a refactor PR that only reorder some of the functions on checks/evaluation/branch_protection.go and clients/githubrepo/branches.go to enhance readability. It ensures that called functions are always after their caller; I also tried to bring together the functions that were meaningfully similar.

I'm doing this mostly because I felt some difficulty understanding and navigating around the functions when working on #3499.

What kind of change does this PR introduce?

It's a refactor

This PR does not change any behavior or bring any breaking change

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Merging #3880 (e19af7e) into main (c1066d9) will decrease coverage by 4.55%.
Report is 18 commits behind head on main.
The diff coverage is 89.79%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3880      +/-   ##
==========================================
- Coverage   74.87%   70.33%   -4.55%     
==========================================
  Files         223      223              
  Lines       15993    15993              
==========================================
- Hits        11975    11248     -727     
- Misses       3254     4029     +775     
+ Partials      764      716      -48     

@diogoteles08 diogoteles08 marked this pull request as ready for review February 16, 2024 22:50
@diogoteles08 diogoteles08 requested a review from a team as a code owner February 16, 2024 22:50
@diogoteles08 diogoteles08 requested review from justaugustus and laurentsimon and removed request for a team February 16, 2024 22:50
@spencerschrock
Copy link
Contributor

This file will be changing substantially in #3759. I recommend holding off until after that to see if these changes are still necessary.

Copy link

This pull request has been marked stale because it has been open for 10 days with no activity

@github-actions github-actions bot added the Stale label Mar 12, 2024
@github-actions github-actions bot removed the Stale label Mar 21, 2024
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
@diogoteles08 diogoteles08 force-pushed the refactor/function-ordering-on-branch-protection-eval branch from 3d400c9 to e19af7e Compare March 21, 2024 15:08
@diogoteles08
Copy link
Contributor Author

@spencerschrock I've rebased it after #3759 . Please take a look if that makes sense to you.

Copy link

github-actions bot commented Apr 2, 2024

This pull request has been marked stale because it has been open for 10 days with no activity

@github-actions github-actions bot added Stale and removed Stale labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants