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

chore: warn devs when their feature branches may be too large #1571

Merged
merged 10 commits into from
Dec 16, 2024

Conversation

samayer12
Copy link
Collaborator

@samayer12 samayer12 commented Dec 12, 2024

Description

Collectively, the Pepr team has reviewed some large PRs lately (e.g., #1262, #1543, #1539, #1396, #1402, #1407). We prefer several smaller PRs to reduce the amount of time spent in code-review and to encourage working in small chunks. This script is an example of a pre-push hook using Husky that warns devs when their branch may be too large.

This PR does not fulfill a need in the backlog, and does not need to be merged. Rather, it's offered as an example to how a Pepr developer might use a similar script for their local development.

Related Issue

None.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.84%. Comparing base (38ece9e) to head (a838c0b).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1571   +/-   ##
=======================================
  Coverage   80.84%   80.84%           
=======================================
  Files          42       42           
  Lines        1952     1952           
  Branches      424      451   +27     
=======================================
  Hits         1578     1578           
+ Misses        372      345   -27     
- Partials        2       29   +27     

see 8 files with indirect coverage changes

@samayer12 samayer12 marked this pull request as ready for review December 12, 2024 22:42
@samayer12 samayer12 requested a review from a team as a code owner December 12, 2024 22:42
@samayer12 samayer12 self-assigned this Dec 12, 2024
@samayer12
Copy link
Collaborator Author

samayer12 commented Dec 13, 2024

@cmwylie19, what do you think about making the pre-push script an opt-in via an environment variable? We don't want to force everyone to work that way since it's highly-opinionated and hooks can be bypassed with --no-verify anyways.

@cmwylie19
Copy link
Collaborator

@cmwylie19, what do you think about making the pre-push script an opt-in via an environment variable? We don't want to force everyone to work that way since it's highly-opinionated and hooks can be bypassed with --no-verify anyways.

Yeah that can work

@samayer12
Copy link
Collaborator Author

Set PEPR_HOOK_OPT_IN=1 as an envar on your local machine to use this optional pre-push hook

@samayer12 samayer12 removed the ON HOLD label Dec 16, 2024
Copy link
Collaborator

@cmwylie19 cmwylie19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed as a team, people who desire this can opt in

@cmwylie19 cmwylie19 enabled auto-merge December 16, 2024 18:34
@cmwylie19 cmwylie19 added this pull request to the merge queue Dec 16, 2024
Merged via the queue into main with commit 8af6381 Dec 16, 2024
48 checks passed
@cmwylie19 cmwylie19 deleted the pre-push-size-check branch December 16, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants