Skip to content

Add missing attributes to BranchProtection Jan 2024#2793

Closed
jodelasur wants to merge 4 commits intoPyGithub:mainfrom
jodelasur:add-required-conversation-resolution
Closed

Add missing attributes to BranchProtection Jan 2024#2793
jodelasur wants to merge 4 commits intoPyGithub:mainfrom
jodelasur:add-required-conversation-resolution

Conversation

@jodelasur
Copy link
Contributor

@jodelasur jodelasur commented Oct 12, 2023

Fixes #2862. Also added other missing attributes.

All attributes added:

  • allow_force_pushes
  • allow_deletions
  • required_conversation_resolution
  • lock_branch
  • allow_fork_syncing

Used scripts/add_attribute and added attribute tests accordingly using existing replay data.

@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (603896f) 96.69% compared to head (438312b) 96.70%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2793   +/-   ##
=======================================
  Coverage   96.69%   96.70%           
=======================================
  Files         142      142           
  Lines       14533    14568   +35     
=======================================
+ Hits        14053    14088   +35     
  Misses        480      480           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jodelasur jodelasur marked this pull request as ready for review October 12, 2023 01:03
Copy link
Collaborator

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

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

While you are there, can you add all other missing attributes as well, please?

https://docs.github.com/en/rest/branches/branch-protection#get-branch-protection

@jodelasur jodelasur changed the title Add required_conversation_resolution to BranchProtection Add missing attributes to BranchProtection Jan 2024 Jan 3, 2024
@jodelasur jodelasur requested a review from EnricoMi January 3, 2024 03:21
@JayChanggithub
Copy link

"Hi @jodelasur, we're interested in adopting these functionalities. Could you expedite the merging of the pull requests, or do you have any suggestions for directly incorporating these modules? Thanks!"

@jodelasur
Copy link
Contributor Author

@JayChanggithub , waiting for further review from @EnricoMi to have this merged.

@treee111
Copy link
Contributor

treee111 commented Jan 12, 2024

also fixes #2373 in my opinion. well, maybe not fully...

question @jodelasur:
is this PR only for reading the added fields of branch protection via

  1. branch.get_protection()

or also editing branch protection for these fields via e.g.

  1. branch.edit_protection(allow_force_pushes=True)

while testing for me it seams that only 1. is added with this PR
thanks for your work @jodelasur 👍

@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.

BranchProtection.required_conversation_resolution is missing

5 participants