[Docs] Migrate API Docs to Scalar #4790
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
| # This workflow will perform required checks on pull requests | |
| # Uses: | |
| # OS: ubuntu-latest | |
| name: "🔎 PR Check" | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, labeled, unlabeled, ready_for_review] | |
| jobs: | |
| check-labels: | |
| name: "🏷️ Check PR Labels" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check for required PR labels | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const requiredLabels = [ | |
| 'Type/New Feature', | |
| 'Type/Improvement', | |
| 'Type/Bug', | |
| 'skip-changelog' | |
| ]; | |
| if (typeof context === 'undefined' || !context.payload || !context.payload.pull_request) { | |
| core.setFailed('Could not find PR labels in the event payload.'); | |
| return; | |
| } | |
| const prLabels = context.payload.pull_request.labels.map(l => l.name); | |
| const hasRequired = prLabels.some(label => requiredLabels.includes(label)); | |
| if (!hasRequired) { | |
| core.setFailed(`PR must have at least one of the following labels: ${requiredLabels.join(', ')}`); | |
| } else { | |
| core.info('PR has the required labels.'); | |
| } |