diff --git a/IntegrationTest.py b/IntegrationTest.py index da5f1c1b..c1a795a5 100644 --- a/IntegrationTest.py +++ b/IntegrationTest.py @@ -203,5 +203,6 @@ IntegrationTest().main() # To repository # ------------- -# branch = PyGithub.create_git_ref( "refs/heads/test", PyGithub.get_git_ref( "heads/master" ).object[ "sha" ] ) -# branch.edit( sha = "9f868e490c79c3ec899dc450e7cb4f9b0fa9e88c", force = True ) +# branch = r.create_git_ref( "refs/heads/test", r.get_git_ref( "heads/master" ).object[ "sha" ] ) +# branch.edit( "cf96b288a03daba509c0ec7e3e7384fe9e0f472d", force = True ) +# r.get_git_ref( "heads/test" ).edit( "9f868e490c79c3ec899dc450e7cb4f9b0fa9e88c", force = True ) diff --git a/github/GithubObjects.py b/github/GithubObjects.py index d52a4d03..21880cd0 100644 --- a/github/GithubObjects.py +++ b/github/GithubObjects.py @@ -86,7 +86,7 @@ Repository = GithubObject( ListAttribute( "contributors", NamedUser, ListGetable( [], [] ) ), ListAttribute( "watchers", NamedUser, ListGetable( [], [] ) ), Editable( [ "name" ], [ "description", "homepage", "public", "has_issues", "has_wiki", "has_downloads" ] ), - ListOfObjects( "git/refs", GitRef, creatable = True, singularName = "git_ref" ), + ListOfObjects( "git/refs", GitRef, Creatable( "git_ref", [ "ref", "sha" ], [] ) ), ObjectGetter( "git_ref", GitRef, lambda repo, ref: { "_repo": repo, "ref": ref } ), ) Repository._addAttributePolicy( ComplexAttribute( "parent", Repository ) )