Skip to content

Commit

Permalink
Merge branch 'main' into singlestore
Browse files Browse the repository at this point in the history
  • Loading branch information
codingkarthik authored Sep 2, 2024
2 parents b8f358d + 9c75f93 commit 372d480
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/registry-updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,23 @@ jobs:
with:
fetch_depth: 1


- name: Check for PR approvals
id: check-approval
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { data: reviews } = await github.pulls.listReviews({
const { owner, repo } = context.issue;
const pull_number = context.payload.pull_request.number;
console.log("Owner and repo and pull_number", owner, repo, pull_number);
const { data: reviews } = await github.rest.pulls.listReviews({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
});
const approved = reviews.some(review => review.state === 'APPROVED');
return approved;
- name: Cancel if not approved
if: steps.check-approval.outputs.approved == 'false'
run: |
echo "The PR has not been approved. Cancelling the workflow."
exit 1 # This will exit the workflow early
if (!approved) {
core.setFailed('This workflow will only run when the PR is approved by someone in Hasura')
}
- name: Get all connector version package changes
id: connector-version-changed-files
Expand Down

0 comments on commit 372d480

Please sign in to comment.