Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle workflow runs that do not have a conclusion in [githubactionsworkflowstatus] #8717

Merged
merged 2 commits into from
Dec 15, 2022

Conversation

chris48s
Copy link
Member

Closes #8716

It was always too much to ask for this to go completely to plan 😆

When a build is not completed yet, it has a null value for .conclusion e.g:

status: 'in_progress',
conclusion: null,

This PR allows .conclusion to be null and requires a non-null value for status which we can fall back to.

@chris48s chris48s added bug Bugs in badges and the frontend service-badge Accepted and actionable changes, features, and bugs labels Dec 15, 2022
'queued',
'requested',
'waiting'
).required(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Values for status are taken from

https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#get-a-workflow-run

Screenshot at 2022-12-15 20-09-48

I was in two minds about whether to add all the status values to build-status.js and attempt to classify them. The solution I've settled on is to leave that as-is and if we fall back to a status value and we don't have a formatting rule for it, just use default lightgrey for formatting.

I was also in two minds about whether to use a closed list here or allow any string (but make it required). Open to feedback on it..

@shields-ci
Copy link

shields-ci commented Dec 15, 2022

Messages
📖 ✨ Thanks for your contribution to Shields, @chris48s!

Generated by 🚫 dangerJS against ff5930c

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schema proposal works for me 👍 In general I'd have been more inclined to grab a transform function and unit test, but no objections to this since you've already battled and defeated the nock intercepts 😄

@calebcartwright
Copy link
Member

Going to go ahead and let the bots merge this and then will run a deploy later tonight

@repo-ranger repo-ranger bot merged commit 6049ef6 into badges:master Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs in badges and the frontend service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GitHub Actions] "invalid response data" for pending jobs
3 participants