mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-14 23:26:39 +03:00
Required sections now only need their headings present; the gate no longer judges what sits under them. The daily sweep and its 5-day auto-close are removed: no-template issues still close immediately, partial failures stay open with a label and one warning. The bug template gains a required "How did you run impeccable?" section so reports confirm docs-intended usage instead of pasting custom scripts. AI-assisted: written with an AI agent under maintainer direction. Co-authored-by: Cursor <cursoragent@cursor.com>
71 lines
2.0 KiB
YAML
71 lines
2.0 KiB
YAML
name: Issue Gate
|
|
|
|
on:
|
|
issues:
|
|
types: [opened, edited, reopened]
|
|
issue_comment:
|
|
types: [created]
|
|
workflow_dispatch:
|
|
inputs:
|
|
issue:
|
|
description: "Issue number to evaluate"
|
|
type: number
|
|
required: true
|
|
dry_run:
|
|
description: "Print planned changes without mutating GitHub"
|
|
type: boolean
|
|
default: false
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
|
|
concurrency:
|
|
group: issue-gate-${{ github.event.issue.number || inputs.issue }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
gate:
|
|
runs-on: ubuntu-latest
|
|
# Skip PR comments (issue_comment fires for those too) and anything the
|
|
# gate itself posts.
|
|
if: >-
|
|
github.event_name != 'issue_comment' ||
|
|
(github.event.issue.pull_request == null && github.event.comment.user.type != 'Bot')
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Run issue gate
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
mode="--apply"
|
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.dry_run }}" = "true" ]; then
|
|
mode="--dry-run"
|
|
fi
|
|
|
|
case "${{ github.event_name }}" in
|
|
issue_comment)
|
|
node scripts/github/issue-gate.mjs "$mode" \
|
|
--repo "$GITHUB_REPOSITORY" \
|
|
--issue "${{ github.event.issue.number }}" \
|
|
--comment-id "${{ github.event.comment.id }}"
|
|
;;
|
|
workflow_dispatch)
|
|
node scripts/github/issue-gate.mjs "$mode" \
|
|
--repo "$GITHUB_REPOSITORY" \
|
|
--issue "${{ inputs.issue }}"
|
|
;;
|
|
*)
|
|
node scripts/github/issue-gate.mjs "$mode" \
|
|
--repo "$GITHUB_REPOSITORY" \
|
|
--issue "${{ github.event.issue.number }}"
|
|
;;
|
|
esac
|