Skip to content

Commit

Permalink
set states
Browse files Browse the repository at this point in the history
  • Loading branch information
NickRimmer committed Nov 14, 2024
1 parent 17f6c95 commit 43a63fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/pr-scheduler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ jobs:

- name: Set pending Status
uses: actions/github-script@v6
env:
prSha: ${{ matrix.pr.head.sha }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -93,8 +95,6 @@ jobs:
context: 'PR Validation / Auto',
description: 'Validation is in progress...',
});
env:
prSha: ${{ matrix.pr.head.sha }}
- name: Prepare Validation
uses: actions/checkout@v4
Expand Down Expand Up @@ -126,14 +126,14 @@ jobs:
if: success()
uses: actions/github-script@v6
env:
pr: ${{ matrix.pr }}
prSha: ${{ matrix.pr.head.sha }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: process.env.pr.head.sha,
sha: process.env.prSha,
state: 'success',
context: 'PR Validation / Auto',
description: 'Validation passed successfully.',
Expand All @@ -143,14 +143,14 @@ jobs:
if: failure()
uses: actions/github-script@v6
env:
pr: ${{ matrix.pr }}
prSha: ${{ matrix.pr.head.sha }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: process.env.pr.head.sha,
sha: process.env.prSha,
state: 'failure',
context: 'PR Validation / Auto',
description: 'Validation failed.',
Expand Down

0 comments on commit 43a63fa

Please sign in to comment.