Skip to content

Conversation

@simeonschaub
Copy link
Contributor

!!! This is untested!

This is according to PyGithub/PyGithub#2345 (comment)

Locally I tested that the following works correctly:

In [24]: from github import Github, Auth

In [25]: auth = Auth.Token(token)

In [26]: g = Github(auth=auth)

In [27]: repo = g.get_repo("JuliaRegistries/General")

In [28]: registry_toml = repo.get_contents("Registry.toml")

In [39]: blob = repo.get_git_blob(registry_toml.sha)

In [40]: b64 = base64.b64decode(blob.content)

In [41]: b64.decode("utf8")

!!! This is untested!

This is according to PyGithub/PyGithub#2345 (comment)

Locally I tested that the following works correctly:

```python
In [24]: from github import Github, Auth

In [25]: auth = Auth.Token(token)

In [26]: g = Github(auth=auth)

In [27]: repo = g.get_repo("JuliaRegistries/General")

In [28]: registry_toml = repo.get_contents("Registry.toml")

In [39]: blob = repo.get_git_blob(registry_toml.sha)

In [40]: b64 = base64.b64decode(blob.content)

In [41]: b64.decode("utf8")
```
@IanButterworth
Copy link
Member

Great! The tests here are evidently far from ideal and I've not found a way to test this in the wild before cutting a release.

But "should work" is better than not working, so I'll merge and make a patch release.

@IanButterworth IanButterworth merged commit beecfc8 into JuliaRegistries:master Sep 23, 2024
@simeonschaub simeonschaub deleted the patch-1 branch September 23, 2024 11:11
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.

2 participants