Skip to content

Commit

Permalink
BERTE-565 fixup key error on html url for checksuites
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet committed Apr 29, 2022
1 parent 80e0305 commit 6aee81d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Change Log
All notable changes to this project will be documented in this file.

## [3.6.9] - 2022-04-25

## [3.6.11] - 2022-04-28
# Fixed
- Fix Key error when retrieve html_url for checksuites

## [3.6.10] - 2022-04-25
# Fixed
- Fix Key error when workflow dispatch is triggered on the commit_status checked

Expand Down
4 changes: 2 additions & 2 deletions bert_e/git_host/github/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ def __init__(self, *args, **kwargs):

@property
def url(self):
def sort_f(check_run):
date = check_run.get('started_at')
def sort_f(check_suite):
date = check_suite.get('created_at')
if date:
return datetime.strptime(date, '%Y-%m-%dT%H:%M:%SZ')
return datetime(year=1962, month=1, day=1)
Expand Down
2 changes: 2 additions & 0 deletions bert_e/git_host/github/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ class CheckSuite(Schema):
id = fields.Integer()
head_sha = fields.Str()
head_branch = fields.Str()
html_url = fields.Url()
created_at = fields.DateTime()
status = fields.Str()
conclusion = fields.Str(allow_none=True)
repository = fields.Nested(Repo)
Expand Down

0 comments on commit 6aee81d

Please sign in to comment.