Skip to content

Commit

Permalink
Add unarchiving support
Browse files Browse the repository at this point in the history
The github API now allows unarchiving an archived repo. This removes the check so that we ar able to unarchive repos using pygithub.
  • Loading branch information
Tsuesun committed Feb 13, 2023
1 parent 5e27c10 commit ed3409b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -46,5 +46,6 @@
/doc/doctrees/
.vscode*
.venv
venv
.tox/
.mypy_cache/
6 changes: 3 additions & 3 deletions github/Repository.py
Expand Up @@ -1582,7 +1582,7 @@ def edit(
:param allow_merge_commit: bool
:param allow_rebase_merge: bool
:param delete_branch_on_merge: bool
:param archived: bool. Unarchiving repositories is currently not supported through API (https://docs.github.com/en/rest/reference/repos#update-a-repository)
:param archived: bool
:rtype: None
"""
if name is None:
Expand Down Expand Up @@ -1627,8 +1627,8 @@ def edit(
assert delete_branch_on_merge is github.GithubObject.NotSet or isinstance(
delete_branch_on_merge, bool
), delete_branch_on_merge
assert archived is github.GithubObject.NotSet or (
isinstance(archived, bool) and archived is True
assert archived is github.GithubObject.NotSet or isinstance(
archived, bool
), archived
post_parameters = {
"name": name,
Expand Down

0 comments on commit ed3409b

Please sign in to comment.