Skip to content

Feat: Add missing branch protection fields incl. lock_branch#2378

Closed
harry-unlikelyai wants to merge 7 commits intoPyGithub:mainfrom
harry-unlikelyai:complete-branch-protection-lock-bracnh
Closed

Feat: Add missing branch protection fields incl. lock_branch#2378
harry-unlikelyai wants to merge 7 commits intoPyGithub:mainfrom
harry-unlikelyai:complete-branch-protection-lock-bracnh

Conversation

@harry-unlikelyai
Copy link
Contributor

Fixes #2373

Add new BranchProtection options listed here: https://developer.github.com/v3/repos/branches/

required_linear_history
allow_force_pushes
allow_deletions
lock_branch

Replica of #1723 and #2376 but also adds lock_branch.

@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2022

Codecov Report

Base: 98.75% // Head: 98.62% // Decreases project coverage by -0.13% ⚠️

Coverage data is based on head (1d0a7dc) compared to base (7902351).
Patch coverage: 63.63% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2378      +/-   ##
==========================================
- Coverage   98.75%   98.62%   -0.14%     
==========================================
  Files         115      115              
  Lines       11578    11622      +44     
==========================================
+ Hits        11434    11462      +28     
- Misses        144      160      +16     
Impacted Files Coverage Δ
github/BranchProtection.py 82.27% <57.14%> (-13.80%) ⬇️
github/Branch.py 90.90% <75.00%> (-1.60%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@martinmosegaard
Copy link

Is it possible to add require_last_push_approval in this PR as well?

@harry-unlikelyai
Copy link
Contributor Author

@martinmosegaard Ok added that too now

@martinmosegaard
Copy link

@harry-unlikelyai
Copy link
Contributor Author

Ah interesting, I had added it in the wrong way then since it needs to be part of the required_pull_request_reviews object

@treee111
Copy link
Contributor

Hi @harry-unlikelyai, you have conflicts with the base branch. PR's 2793 and 2716 have also the same field allow_deletions, see my comment

@EnricoMi
Copy link
Collaborator

Superseded by #2873, added you as co-author to appreciate your contribution.

@EnricoMi EnricoMi closed this Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

github.BranchProtection.BranchProtection missing 3 attributes

6 participants