fix: Vertex AI Express Mode — remove responseSchema+googleSearch conflict #85
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Checks | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize, edited] | |
| permissions: | |
| issues: write | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const pr = context.payload.pull_request; | |
| const issues = []; | |
| if (pr.title.length < 10) { | |
| issues.push('❌ PR title too short (minimum 10 characters)'); | |
| } | |
| if (!/^(feat|fix|docs|style|refactor|test|chore|perf|ci|build|revert)(\(.+\))?:/.test(pr.title)) { | |
| issues.push('⚠️ PR title should follow conventional commits format'); | |
| } | |
| if (!pr.body || pr.body.length < 20) { | |
| issues.push('❌ PR description is required (minimum 20 characters)'); | |
| } | |
| const totalChanges = (pr.additions || 0) + (pr.deletions || 0); | |
| if (totalChanges > 500) { | |
| issues.push(`⚠️ Large PR detected (${totalChanges} lines changed)`); | |
| } | |
| if (issues.length > 0) { | |
| // Fork PRs get a read-only GITHUB_TOKEN; skip commenting to avoid errors | |
| if (pr.head.repo.full_name === pr.base.repo.full_name) { | |
| const comment = `## 🔍 PR Validation\n\n${issues.join('\n')}`; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: pr.number, | |
| body: comment | |
| }); | |
| } else { | |
| core.warning('Skipping PR comment for fork PR (read-only token)'); | |
| issues.forEach(issue => core.warning(issue)); | |
| } | |
| core.setFailed('PR validation failed'); | |
| } |