Skip to content

Commit

Permalink
Фикс unassigned action
Browse files Browse the repository at this point in the history
  • Loading branch information
memew1se committed Jun 30, 2022
1 parent 7cc37d6 commit b157da8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@


def create_or_update_page(
page: dict or None, title: str, number: str, labels: dict, author: str
page: dict or None, title: str, number: str, labels: dict, author: str
) -> dict:
url = "https://api.notion.com/v1/pages/"

Expand Down Expand Up @@ -219,7 +219,14 @@ def main():
issue_title = EVENT_JSON["issue"]["title"]
issue_number = EVENT_JSON["issue"]["number"]
issue_labels = EVENT_JSON["issue"]["labels"]
issue_author = EVENT_JSON["issue"]["assignee"]["login"]

try:
issue_author = EVENT_JSON["issue"]["assignee"]["login"]
except TypeError as e:
print("!" * 15, "ERROR", "!" * 15)
print(e)
print("!" * 15, "ERROR", "!" * 15)
issue_author = ""

if action_type == "opened":
page = create_or_update_page(
Expand Down

0 comments on commit b157da8

Please sign in to comment.