mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 14:38:13 -05:00
Fix public PR triage validation (#3531)
This commit is contained in:
14
.github/workflows/pull_request.yml
vendored
14
.github/workflows/pull_request.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const requiredChecks = ['Tests', 'Formatting'];
|
||||
const requiredChecks = ['format', 'tests'];
|
||||
|
||||
const pr = context.payload.pull_request;
|
||||
if (!pr) {
|
||||
@@ -33,16 +33,8 @@ jobs:
|
||||
|
||||
if (!match || match.conclusion !== 'success') {
|
||||
const status = match ? (match.conclusion ?? match.status ?? 'unknown') : 'missing';
|
||||
core.warning(`Required check '${requiredCheck}' did not pass (${status}). Removing triaged label.`);
|
||||
|
||||
await github.rest.issues.removeLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: pr.number,
|
||||
name: 'triaged'
|
||||
});
|
||||
|
||||
throw new Error('Cannot triage until required checks succeed.');
|
||||
core.warning(`Required check '${requiredCheck}' did not pass (${status}).`);
|
||||
throw new Error('Cannot triage until required checks succeed. Remove and re-add the triaged label to retry.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
.github/workflows/pull_request_checks.yml
vendored
2
.github/workflows/pull_request_checks.yml
vendored
@@ -8,7 +8,7 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
format:
|
||||
tests:
|
||||
runs-on: [ windows-latest ]
|
||||
steps:
|
||||
- name: Full Checkout
|
||||
|
||||
Reference in New Issue
Block a user