[Feature]: Support model allow and deny listing in LLM Provider #8
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: Enforce Design Gate | |
| # Fires when a label is added or removed from an issue. | |
| # Used to warn when required design labels are missing. | |
| on: | |
| issues: | |
| types: [labeled, unlabeled] | |
| jobs: | |
| enforce-design-gate: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write # Required to post a comment on the issue. | |
| steps: | |
| - name: Warn if design gate labels are incomplete | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const REQUIRED_LABELS = ['Design Done', 'Mail Sent']; | |
| const GATE_LABEL = 'Design Done'; // Only warn when a required label is removed. | |
| // Only act when a required label is removed. | |
| const removedLabel = context.payload.label?.name; | |
| if ( | |
| context.payload.action !== 'unlabeled' || | |
| !REQUIRED_LABELS.includes(removedLabel) | |
| ) { | |
| console.log('Not a relevant label change — skipping.'); | |
| return; | |
| } | |
| console.log(`Label "${removedLabel}" removed. Posting design gate warning...`); | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.issue.number, | |
| body: [ | |
| '> [!WARNING]', | |
| `> **Design gate incomplete.** The \`${removedLabel}\` label was removed from this issue.`, | |
| '>', | |
| `> This issue should **not** be moved to the **Development** phase until both of the following labels are present:`, | |
| '>', | |
| ...REQUIRED_LABELS.map(l => `> - \`${l}\``), | |
| ].join('\n'), | |
| }); | |
| console.log(`Warning comment posted on issue #${context.payload.issue.number}.`); |