From c7e3ae94214eaa702121d6ff08c92d83af47ebd9 Mon Sep 17 00:00:00 2001 From: Sol Redfern <59831933+Tsuesun@users.noreply.github.com> Date: Mon, 13 Feb 2023 12:43:07 +0000 Subject: [PATCH] Add unarchiving support (#2391) --- .gitignore | 1 + github/Repository.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4ed40f01..ecf955bd 100644 --- a/.gitignore +++ b/.gitignore @@ -46,5 +46,6 @@ /doc/doctrees/ .vscode* .venv +venv .tox/ .mypy_cache/ diff --git a/github/Repository.py b/github/Repository.py index 25751006..e55b26dc 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -1582,7 +1582,7 @@ class Repository(github.GithubObject.CompletableGithubObject): :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: @@ -1627,8 +1627,8 @@ class Repository(github.GithubObject.CompletableGithubObject): 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,