[AV-132461] Add private endpoint DNS exposure and acceptance coverage #1185
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 Title Check | |
| on: [pull_request] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| check-pr-title: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check PR Title | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| // Fetch the current PR data | |
| const pr = await github.rest.pulls.get({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.issue.number | |
| }); | |
| const title = pr.data.title; | |
| const pattern = /^\[AV-\d+\]\s+[A-Z][A-Za-z\s].+/; | |
| if (!pattern.test(title)) { | |
| const errorMessage = `🚨 PR title "${title}" does not match the required format. | |
| Requirements: | |
| - Must start with [AV-XXXXX] where X is any number of digits | |
| - After the bracket, must start with a Verb (Add, Update, Fix, etc.) | |
| - The Verb must start with an uppercase letter | |
| Expected format: [AV-XXXXX] Verb ... | |
| Example: [AV-98659] Implement Cluster On/Off feature | |
| Valid verbs: Add, Update, Fix, Implement, Remove, Refactor, etc.`; | |
| // Add comment to the PR | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: errorMessage | |
| }); | |
| core.setFailed(errorMessage); | |
| } |