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

Enhancement: get the allow_forking flag value for a GHRepository #1588

Closed
zemunk opened this issue Dec 28, 2022 · 2 comments · Fixed by #1709
Closed

Enhancement: get the allow_forking flag value for a GHRepository #1588

zemunk opened this issue Dec 28, 2022 · 2 comments · Fixed by #1709

Comments

@zemunk
Copy link

zemunk commented Dec 28, 2022

I'd like to contribute a small enhancement to the GHRepository class and add a method to get the value of the allow_forking flag.

From the GitHub REST API Docs:

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

Example context:
I need to fork repositories in a multistep workflow, but for private and internal repos forking can be disabled.
In these cases instead of getting an exception when trying to fork, I'd like to be able to check at the very beginning if it is possible at all and provide a proper message to the users.

@bitwiseman
Copy link
Member

Go for it. PRs welcome.

@varun-khachane
Copy link

Hi, I would like to work on this. Can you assign it to me?

bitwiseman added a commit that referenced this issue Oct 19, 2023
…-forking-flag-repository

Add allow_forking flag for a GHRepository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants