mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Use Creatable
This commit is contained in:
+3
-2
@@ -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 )
|
||||
|
||||
@@ -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 ) )
|
||||
|
||||
Reference in New Issue
Block a user