Skip to content

Commit

Permalink
chore: update triggers ro only run on review
Browse files Browse the repository at this point in the history
  • Loading branch information
devindford committed Oct 21, 2024
1 parent dd93416 commit e2d43fc
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/codeowner_review_status.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Code Owners Approval Check

on:
pull_request:
branches:
- master
types: [opened, synchronize, reopened, ready_for_review]
pull_request_review:
types: [submitted, dismissed]

Expand Down Expand Up @@ -163,22 +159,4 @@ jobs:
core.setFailed(`Missing approvals from code owners: ${missingApprovals.map(status => status.owner).join(', ')}`);
} else {
console.log('All relevant code owners have approved the pull request.');
}
- name: Update check run status
if: steps.check_approvals.outcome == 'success'
uses: actions/github-script@v7
with:
github-token: ${{secrets.CODEOWNER_WORKFLOW_TOKEN}}
script: |
const checkRunId = context.runId;
await github.rest.checks.update({
owner: context.repo.owner,
repo: context.repo.repo,
check_run_id: checkRunId,
conclusion: 'success',
output: {
title: 'Code Owners Approval Check',
summary: 'The pull request has been approved by code owners.',
},
});
}

0 comments on commit e2d43fc

Please sign in to comment.