Skip to content

Commit

Permalink
Fix key in GitHub Actions payload
Browse files Browse the repository at this point in the history
  • Loading branch information
textbook committed Apr 4, 2021
1 parent e4f1c24 commit 97859e3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion flash_services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from .travis import TravisOS, TravisPro

__author__ = 'Jonathan Sharpe'
__version__ = '0.12.0'
__version__ = '0.12.1'

blueprint = Blueprint(
'services',
Expand Down
2 changes: 1 addition & 1 deletion flash_services/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def url_params(self):
return params

def format_data(self, data):
builds = [self.format_build(build) for build in data['workflows']]
builds = [self.format_build(build) for build in data['workflow_runs']]
estimate_time(builds)
return dict(name=self.name, builds=builds[:4], health=health_summary(builds))

Expand Down
10 changes: 5 additions & 5 deletions tests/test_github_actions_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_update_success(service, caplog, mocked_responses):
mocked_responses.add(
responses.GET,
'https://api.github.com/repos/foo/bar/actions/runs?per_page=100',
json=dict(total_count=0, workflows=[]),
json=dict(total_count=0, workflow_runs=[]),
)

result = service.update()
Expand Down Expand Up @@ -61,7 +61,7 @@ def test_passing_build(service, mocked_responses):
responses.GET,
'https://api.github.com/repos/foo/bar/actions/runs?per_page=100',
json={
"workflows": [
"workflow_runs": [
{
"conclusion": "success",
"created_at": "2016-04-14T20:47:40Z",
Expand Down Expand Up @@ -101,7 +101,7 @@ def test_failing_build(service, mocked_responses):
responses.GET,
'https://api.github.com/repos/foo/bar/actions/runs?per_page=100',
json={
"workflows": [
"workflow_runs": [
{
"conclusion": "failure",
"created_at": "2016-04-14T20:47:40Z",
Expand Down Expand Up @@ -159,7 +159,7 @@ def test_working_build(service, mocked_responses):
responses.GET,
'https://api.github.com/repos/foo/bar/actions/runs?per_page=100',
json={
"workflows": [
"workflow_runs": [
{
"created_at": "2016-04-14T20:47:40Z",
"head_commit": {
Expand Down Expand Up @@ -203,7 +203,7 @@ def test_actions_enterprise_update(caplog, mocked_responses):
mocked_responses.add(
responses.GET,
'http://dummy.url/repos/foo/bar/actions/runs?per_page=100',
json=dict(total_count=0, workflows=[]),
json=dict(total_count=0, workflow_runs=[]),
)
service = GitHubEnterpriseActions(
username='enterprise-user',
Expand Down

0 comments on commit 97859e3

Please sign in to comment.