-
Notifications
You must be signed in to change notification settings - Fork 184
Updating GitHub Repository Branch Protection Rules #162
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
Comments
Are you using jupyter (IPython) ? Instead of |
Thanks for the quick response! I am using Spyder (Python 3.8) from Anaconda |
Please always send full stack traces in the bug reports so that we can help you |
Apologies, I'll send full stack traces from now on. This is the full stack (its a syntax error): runfile('branchProtectionRuleSetting.py', wdir='03_Github_Repo_labels') |
OK, you should instead use:
|
Looks like my running event loop went away! But I have some other warnings now:
I'm trying to connect to a GitHub enterprise, not a regular GitHub repo. Apologies in advance if this is a lot of code, I'm trying to figure out the package as I go. |
Are you sure that your URL is a GraphQL endpoint? It seems to return text/html results instead of json |
You could try with the latest version from master, it should show the answer in the exception.
|
Looks like I have a fundamental misunderstanding of what URL I should be pointing too. My apologies on not doing the proper research there. The URL I am referencing to is my org-repo link. Do I need to take additional steps to create or point to a GraphQL endpoint? If so, can you direct me to the appropriate documentation? Thanks |
If it is using the standard GitHub API, you could check the issue #149 |
I added a section in the docs (PR #165) so that it is more clear for IPython users. |
Hello!
I have been trying to integrate GitHub repo settings via Python and everything was going smoothly using the GitHub package. Unfortunately, the package does not contain any functions on creating new repo branch protection rules, so I had to switch to the gql package. I'm having a difficult time understanding the lingo surrounding this package so I was hoping to get some help here.
I have been doing independent research, but I can't seem to find anything of relevance on the subject. I emailed a member of this community and they suggested I create an issue here. Thank you for the assistance.
My code:
This code results in the following error:
RuntimeError: asyncio.run() cannot be called from a running event loop
A couple things to note that may cause this error:
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: