Skip to content

Commit

Permalink
ci: fix check_enforcer.yml (microsoft#233)
Browse files Browse the repository at this point in the history
# Description

Please add an informative description that covers that changes made by
the pull request and link all relevant issues.

# All Promptflow Contribution checklist:
- [ ] **The pull request does not introduce [breaking changes]**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).**

## General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.
  • Loading branch information
elliotzh authored Aug 29, 2023
1 parent f39166e commit 9820f07
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/check_enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ jobs:
- name: Summarize check status
id: summarize_check_status
run: |
status="success"
jq -c '.check_runs | .[] | select (.conclusion!="success") | .html_url' status.json | while read url; do
echo $url
status="pending"
jq -c '.check_runs[]' status.json | while read check_run; do
echo $check_run | jq '{name, html_url, conclusion}'
done
echo "status=$status" >> "$GITHUB_OUTPUT"
pending_count=$(jq -c '.check_runs[].conclusion != "success" | select(.)' status.json | wc -l)
if [ $pending_count -eq 0 ]; then
echo "status=success" >> "$GITHUB_OUTPUT"
else
echo "status=pending" >> "$GITHUB_OUTPUT"
fi
- uses: octokit/[email protected]
name: Update the check enforcer status
Expand Down

0 comments on commit 9820f07

Please sign in to comment.