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

feat: add allow_forking to Repository #2380

Merged
merged 3 commits into from Dec 15, 2022
Merged

feat: add allow_forking to Repository #2380

merged 3 commits into from Dec 15, 2022

Conversation

IbrahimAH
Copy link
Contributor

@IbrahimAH IbrahimAH commented Dec 12, 2022

Closes #2310.

based on #2310
but up to date and with passing tests

Adds to the allow_forking attribute to a Repository: https://docs.github.com/en/rest/repos/repos#update-a-repository

allow_forking boolean
Either true to allow private forks, or false to prevent private forks.

This attribute can be modified via edit (on a private repository):

>>> g.get_repo("<test repo>").allow_forking
True
>>> g.get_repo("<test repo>").edit(allow_forking=False)
>>> g.get_repo("<test repo>").allow_forking
False
>>> g.get_repo("<test repo>").edit(allow_forking=True)
>>> g.get_repo("<test repo>").allow_forking
True

@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2022

Codecov Report

Base: 98.75% // Head: 98.75% // Increases project coverage by +0.00% 🎉

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

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2380   +/-   ##
=======================================
  Coverage   98.75%   98.75%           
=======================================
  Files         115      115           
  Lines       11578    11588   +10     
=======================================
+ Hits        11434    11444   +10     
  Misses        144      144           
Impacted Files Coverage Δ
github/Repository.py 97.20% <100.00%> (+0.01%) ⬆️

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.

@IbrahimAH
Copy link
Contributor Author

@sfdye sorry for the direct tag, was hoping you'd be able to review this as the original PR this was based off became outdated after a few months of not being merged in. Thank you

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.

None yet

3 participants