feat(storage): storage vectors and analytics in storage-js #100
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: Block WIP/Draft Merges | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, labeled, unlabeled, ready_for_review] | |
permissions: | |
pull-requests: write | |
checks: write | |
jobs: | |
block-merge: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if PR should be blocked | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const pr = context.payload.pull_request; | |
const title = pr.title || ''; | |
const isDraft = pr.draft; | |
const labels = pr.labels.map(l => l.name); | |
const hasDoNotMerge = labels.includes('do-not-merge'); | |
const hasWIPInTitle = /\b(wip|do not merge)\b/i.test(title); | |
const shouldBlock = isDraft || hasDoNotMerge || hasWIPInTitle; | |
if (shouldBlock) { | |
core.setFailed('This PR is blocked from merging: ' + | |
(isDraft ? 'Draft PR' : '') + | |
(hasDoNotMerge ? ' do-not-merge label' : '') + | |
(hasWIPInTitle ? ' WIP in title' : '')); | |
} |