diff --git a/pyproject.toml b/pyproject.toml index f71cbe0..30ed447 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ readme = "README.md" dependencies = [ "argus-server>=1.15", "markdownify>=0.11", - "PyGithub>=1.58", + "PyGithub>=1.59", "requests>=2.14", ] requires-python = ">=3.8" diff --git a/src/argus_ticket_github.py b/src/argus_ticket_github.py index b13c454..be8aeea 100644 --- a/src/argus_ticket_github.py +++ b/src/argus_ticket_github.py @@ -61,7 +61,7 @@ def get_labels( missing_fields = [] for field in labels_mapping: - if type(field) is dict: + if type(field).isinstance(dict): # Information can be found in tags label = incident_tags.get(field["tag"], None) if label: @@ -87,7 +87,7 @@ def create_client(endpoint, authentication): try: client = github.Github( - base_url=base_url, login_or_token=authentication["token"] + base_url=base_url, auth=github.Auth.Token(authentication["token"]) ) except Exception: client_error = "Github: Client could not be created."