@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 34f093b417
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 6, 09:30 UTC

[CI] Gate pre-commit on `ready` label or number of contributions (#37544)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

Harry Mellor committed Mar 19, 2026 at 16:21 UTC 34f093b417d492d9cba2d9b54d126a2d87e7e012
1 file changed +30
.github/workflows/pre-commit.yml
+30
@@ -11,9 +11,39 @@ concurrency:
11
12 permissions:
13 contents: read
14 + pull-requests: read
15
16 jobs:
17 + pre-run-check:
18 + if: github.event_name == 'pull_request'
19 + runs-on: ubuntu-latest
20 + steps:
21 + - name: Check PR label and author merge count
22 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
23 + with:
24 + script: |
25 + const { data: pr } = await github.rest.pulls.get({
26 + ...context.repo,
27 + pull_number: context.payload.pull_request.number,
28 + });
29 +
30 + const hasReadyLabel = pr.labels.some(l => l.name === 'ready');
31 +
32 + const { data: mergedPRs } = await github.rest.search.issuesAndPullRequests({
33 + q: `repo:${context.repo.owner}/${context.repo.repo} is:pr is:merged author:${pr.user.login}`,
34 + per_page: 4,
35 + });
36 + const mergedCount = mergedPRs.total_count;
37 +
38 + if (hasReadyLabel || mergedCount >= 4) {
39 + core.info(`Check passed: ready label=${hasReadyLabel}, 4+ merged PRs=${mergedCount >= 4}`);
40 + } else {
41 + core.setFailed(`PR must have the 'ready' label or the author must have at least 4 merged PRs (found ${mergedCount}).`);
42 + }
43 +
44 pre-commit:
45 + needs: pre-run-check
46 + if: always() && (needs.pre-run-check.result == 'success' || needs.pre-run-check.result == 'skipped')
47 runs-on: ubuntu-latest
48 steps:
49 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1