On /describe, preserve the current labels

This commit is contained in:
Ori Kotek
2023-07-24 10:17:26 +03:00
parent 1f987380ed
commit b9c25e487a
5 changed files with 18 additions and 5 deletions

View File

@ -322,5 +322,12 @@ class GithubProvider(GitProvider):
headers, data = self.pr._requester.requestJsonAndCheck(
"PUT", f"{self.pr.issue_url}/labels", input=post_parameters
)
except:
logging.exception("Failed to publish labels")
except Exception as e:
logging.exception(f"Failed to publish labels, error: {e}")
def get_labels(self):
try:
return [label.name for label in self.pr.labels]
except Exception as e:
logging.exception(f"Failed to get labels, error: {e}")
return []