Skip to content

feat(ci): add GitLab issue templates and label-automation triage job#718

Merged
joshjhall merged 1 commit into
mainfrom
feature/issue-298
Jul 5, 2026
Merged

feat(ci): add GitLab issue templates and label-automation triage job#718
joshjhall merged 1 commit into
mainfrom
feature/issue-298

Conversation

@joshjhall

Copy link
Copy Markdown
Owner

Summary

  • Add GitLab issue templates (Bug Report, Feature Request, Refactor) that
    mirror the H2 body anchors from docs/development/filing-issues.md, apply a
    type/* label via a /label quick action, and embed a machine-readable
    Triage block (- Severity: / - Effort:).
  • Add a gitlab-triage policy (.gitlab/triage/triage-policies.yml) that parses
    the Triage block into severity/* / effort/* labels (idempotent via
    forbidden_labels), flags issues missing either label with needs-triage
    plus a note, and clears the flag once fully labeled.
  • Add a reusable, schedule-gated CI include (.gitlab/ci/triage.yml) that runs
    the policy with a pinned gitlab-triage version.
  • Document the GitLab web-UI filing path in docs/development/filing-issues.md.
  • Fix the typos pre-push hook (lefthook.yml) to pass files via
    xargs -d '\n' so the spaced template filenames are not word-split.

This is the GitLab counterpart to the GitHub issue-template work (split from
#228, superseded by #294). It covers the human web-UI filer path; /file-issue
covers the agent path. Both apply the identical taxonomy.

Test plan

  • tests/unit/gitlab-templates.sh — 11 structural assertions (templates,
    quick actions, shared + type-specific H2 anchors, valid Triage defaults, YAML
    validity, full label coverage, both needs-triage rules, schedule gate).
  • Full unit suite green: 3154 passed / 0 failed.
  • yq validates both YAML files; shfmt -i 4 -ci + shellcheck clean on the
    test; typos now passes on the spaced filenames.

Review findings

Pre-PR adversarial review ran (6 of 7 dimensions completed; the 7th agent hung
on a harness stall and was excluded). The one blocking finding — unpinned
gitlab-triage gem executing with an API token — is fixed in this PR (gem
version pinned via GITLAB_TRIAGE_VERSION). Additional high-certainty findings
fixed here: the needs-triage logic now fires when either label is missing
(was: only when both absent), the stibbons labels sync suggestion for
needs-triage was corrected (that label is not skill-owned), the label color no
longer collides with severity/medium, and tests were added for the auto-clear
rule, type-specific anchors, and Triage-default validity.

Deferred as follow-ups:

Closes #298

Add the GitLab counterpart to the GitHub issue-template work so issues filed
through the GitLab web UI carry the severity/effort/type labels /next-issue
needs for prioritization.

- .gitlab/issue_templates/{Bug Report,Feature Request,Refactor}.md — mirror
  the H2 anchors from docs/development/filing-issues.md, apply type/* via a
  /label quick action, and embed a machine-readable Triage block.
- .gitlab/triage/triage-policies.yml — gitlab-triage policy that parses the
  Triage block into severity/* and effort/* labels (idempotent via
  forbidden_labels), flags issues missing either label with needs-triage plus
  a note, and clears the flag once fully labeled.
- .gitlab/ci/triage.yml — reusable, schedule-gated CI include that runs the
  policy with a pinned gitlab-triage version; documents GITLAB_API_TOKEN and
  needs-triage (color D4C5F9, matching the GitHub labeler) setup.
- tests/unit/gitlab-templates.sh — structural guardrails (templates, quick
  actions, type-specific + shared anchors, valid Triage defaults, YAML
  validity, label coverage, both needs-triage rules).
- docs/development/filing-issues.md — GitLab web-UI filing subsection.
- lefthook.yml — fix the typos pre-push hook to pass files via `xargs -d '\n'`
  so paths containing spaces (the new issue templates) are not word-split.

Closes #298
@joshjhall joshjhall merged commit 2a883d6 into main Jul 5, 2026
16 checks passed
@joshjhall joshjhall deleted the feature/issue-298 branch July 5, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GitLab issue templates and label automation CI job

2 participants