From 38556c4f7a37a81f9372674c8fe34d9819e1e689 Mon Sep 17 00:00:00 2001 From: Derek Corniello Date: Fri, 3 Jul 2026 17:11:14 -0700 Subject: [PATCH 1/8] chore: org label taxonomy, template sources, and sync scripts Add enhancement label, per-repo label overlays, and retire priority labels. Add canonical issue template sources per repo and scripts to sync labels, retire old labels, and clear milestones. Remove org PR and issue templates. Part of mux-context#5. Co-authored-by: Cursor --- ISSUE_TEMPLATE/bug_report.md | 37 ---------- ISSUE_TEMPLATE/feature_request.md | 23 ------ PULL_REQUEST_TEMPLATE.md | 19 ----- README.md | 16 ++-- labels/labels.yml | 27 ++----- labels/mux-context.yml | 11 +++ labels/mux-runtime.yml | 8 ++ labels/mux-syntax-highlighting.yml | 26 +++++++ labels/mux-website-api.yml | 11 +++ labels/mux-website.yml | 14 ++++ labels/tree-sitter-mux.yml | 20 +++++ scripts/clear-milestones.sh | 28 +++++++ scripts/retire-labels.sh | 21 ++++++ scripts/sync-labels.sh | 74 +++++++++++++++++++ .../mux-compiler/ISSUE_TEMPLATE/bug_report.md | 34 +++++++++ .../mux-compiler/ISSUE_TEMPLATE/config.yml | 5 ++ .../ISSUE_TEMPLATE/documentation_fix.md | 17 +++++ .../ISSUE_TEMPLATE/feature_request.md | 17 +++++ .../ISSUE_TEMPLATE/adr_proposal.md | 15 ++++ .../mux-context/ISSUE_TEMPLATE/config.yml | 5 ++ .../ISSUE_TEMPLATE/cross_repo_question.md | 13 ++++ .../mux-runtime/ISSUE_TEMPLATE/bug_report.md | 25 +++++++ .../mux-runtime/ISSUE_TEMPLATE/config.yml | 5 ++ .../ISSUE_TEMPLATE/feature_request.md | 17 +++++ .../ISSUE_TEMPLATE/bug_report.md | 29 ++++++++ .../ISSUE_TEMPLATE/config.yml | 5 ++ .../ISSUE_TEMPLATE/syntax_spec_change.md | 29 ++++++++ .../ISSUE_TEMPLATE/bug_report.md | 21 ++++++ .../mux-website-api/ISSUE_TEMPLATE/config.yml | 5 ++ .../ISSUE_TEMPLATE/security_report.md | 19 +++++ .../mux-website/ISSUE_TEMPLATE/bug_report.md | 22 ++++++ .../mux-website/ISSUE_TEMPLATE/config.yml | 5 ++ .../ISSUE_TEMPLATE/documentation_fix.md | 13 ++++ .../ISSUE_TEMPLATE/feature_request.md | 13 ++++ .../ISSUE_TEMPLATE/bug_report.md | 28 +++++++ .../tree-sitter-mux/ISSUE_TEMPLATE/config.yml | 5 ++ .../ISSUE_TEMPLATE/grammar_sync.md | 20 +++++ 37 files changed, 598 insertions(+), 104 deletions(-) delete mode 100644 ISSUE_TEMPLATE/bug_report.md delete mode 100644 ISSUE_TEMPLATE/feature_request.md delete mode 100644 PULL_REQUEST_TEMPLATE.md create mode 100644 labels/mux-context.yml create mode 100644 labels/mux-runtime.yml create mode 100644 labels/mux-syntax-highlighting.yml create mode 100644 labels/mux-website-api.yml create mode 100644 labels/mux-website.yml create mode 100644 labels/tree-sitter-mux.yml create mode 100755 scripts/clear-milestones.sh create mode 100755 scripts/retire-labels.sh create mode 100755 scripts/sync-labels.sh create mode 100644 templates/mux-compiler/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/mux-compiler/ISSUE_TEMPLATE/config.yml create mode 100644 templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.md create mode 100644 templates/mux-compiler/ISSUE_TEMPLATE/feature_request.md create mode 100644 templates/mux-context/ISSUE_TEMPLATE/adr_proposal.md create mode 100644 templates/mux-context/ISSUE_TEMPLATE/config.yml create mode 100644 templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.md create mode 100644 templates/mux-runtime/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/mux-runtime/ISSUE_TEMPLATE/config.yml create mode 100644 templates/mux-runtime/ISSUE_TEMPLATE/feature_request.md create mode 100644 templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/mux-syntax-highlighting/ISSUE_TEMPLATE/config.yml create mode 100644 templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md create mode 100644 templates/mux-website-api/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/mux-website-api/ISSUE_TEMPLATE/config.yml create mode 100644 templates/mux-website-api/ISSUE_TEMPLATE/security_report.md create mode 100644 templates/mux-website/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/mux-website/ISSUE_TEMPLATE/config.yml create mode 100644 templates/mux-website/ISSUE_TEMPLATE/documentation_fix.md create mode 100644 templates/mux-website/ISSUE_TEMPLATE/feature_request.md create mode 100644 templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.md create mode 100644 templates/tree-sitter-mux/ISSUE_TEMPLATE/config.yml create mode 100644 templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.md diff --git a/ISSUE_TEMPLATE/bug_report.md b/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 151862a..0000000 --- a/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -name: Bug report -about: Report something that is not working as expected -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Description - - - -## Steps to reproduce - -1. -2. -3. - -## Expected behavior - - - -## Actual behavior - - - -## Minimal example - -```mux -// Smallest program that reproduces the issue, if applicable. -``` - -## Environment - -- `mux --version`: -- OS / architecture: -- Repo and version (if not mux-compiler): diff --git a/ISSUE_TEMPLATE/feature_request.md b/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index a58bbb9..0000000 --- a/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Feature request -about: Suggest an idea or enhancement -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Problem - - - -## Proposed solution - - - -## Alternatives considered - - - -## Additional context - - diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 5d9ee79..0000000 --- a/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,19 +0,0 @@ -## Summary - - - -## Related issue - - - -## Changes - - -- - -## Checklist - -- [ ] I read the repo's `README.md` / `AGENTS.md` and followed its conventions -- [ ] Formatting, lint, and tests pass locally -- [ ] No special characters (em-dashes, emojis, non-ASCII) in code/comments/commits -- [ ] Docs updated if behavior or public APIs changed diff --git a/README.md b/README.md index 6dc3ef2..452d63f 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,15 @@ Organization-level defaults for the [muxlang](https://github.com/muxlang) org: - `profile/README.md` - the org profile shown on the [organization page](https://github.com/muxlang). -- `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md` - shared community-health defaults applied - org-wide to any repo that does not define its own. -- `ISSUE_TEMPLATE/`, `PULL_REQUEST_TEMPLATE.md` - default issue/PR templates. +- `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md` - shared community-health defaults. +- `labels/` - canonical label YAML and per-repo overlays. +- `templates//` - canonical issue template sources synced to each repo. +- `scripts/sync-labels.sh` - apply label YAML to org repos (`gh` CLI required). +- `scripts/retire-labels.sh` - delete retired labels org-wide. +- `scripts/clear-milestones.sh` - bulk-clear milestones from a repo's issues. -Per-repo files override these defaults. See each repo's own `README.md` and -`AGENTS.md` for repo-specific guidance. +Policy and workflow rules: +[mux-context/docs/repo-governance.md](https://github.com/muxlang/mux-context/blob/main/docs/repo-governance.md). + +Per-repo `.github/ISSUE_TEMPLATE/` files are synced from `templates/` here. +Do not copy templates or invent labels in individual repos. diff --git a/labels/labels.yml b/labels/labels.yml index 6550285..1669f2e 100644 --- a/labels/labels.yml +++ b/labels/labels.yml @@ -1,9 +1,7 @@ -# Canonical label set for every muxlang repo. This file is the authoritative -# list; apply it to each repo manually (e.g. gh label create --force). See -# docs/repo-governance.md in mux-context for the taxonomy and Linear mapping. -# ASCII only (org rule). Colors are 6-digit hex, no leading '#'. +# Canonical label set for every muxlang repo. Apply with scripts/sync-labels.sh. +# Policy: mux-context/docs/repo-governance.md. ASCII only; 6-digit hex colors. -# --- Kind (complements the issue type) --- +# --- Kind --- - name: documentation color: 0075ca description: Improvements or additions to documentation @@ -19,22 +17,11 @@ - name: testing color: 9f267d description: Test coverage or test infrastructure +- name: enhancement + color: a2eeef + description: Improvement to existing behavior or UX -# --- Priority (maps to Linear priority) --- -- name: "priority: urgent" - color: b60205 - description: Needs attention now -- name: "priority: high" - color: d93f0b - description: Important, schedule soon -- name: "priority: medium" - color: fbca04 - description: Normal priority -- name: "priority: low" - color: 0e8a16 - description: Nice to have, no rush - -# --- Quality (works, but feels off) --- +# --- Quality --- - name: inconsistency color: c5def5 description: Behaves or looks different across places that should match diff --git a/labels/mux-context.yml b/labels/mux-context.yml new file mode 100644 index 0000000..00d6e7f --- /dev/null +++ b/labels/mux-context.yml @@ -0,0 +1,11 @@ +# mux-context overlay on labels.yml + +- name: architecture + color: 006b75 + description: Cross-repo architecture or repo map +- name: adr + color: 5319e7 + description: Architecture decision record +- name: governance + color: fbca04 + description: Labels, templates, project board, or process diff --git a/labels/mux-runtime.yml b/labels/mux-runtime.yml new file mode 100644 index 0000000..fc9832e --- /dev/null +++ b/labels/mux-runtime.yml @@ -0,0 +1,8 @@ +# mux-runtime overlay on labels.yml + +- name: stdlib + color: "560143" + description: Standard library addition or change +- name: ffi + color: 4a7967 + description: C-ABI or FFI surface change diff --git a/labels/mux-syntax-highlighting.yml b/labels/mux-syntax-highlighting.yml new file mode 100644 index 0000000..0db4844 --- /dev/null +++ b/labels/mux-syntax-highlighting.yml @@ -0,0 +1,26 @@ +# mux-syntax-highlighting overlay on labels.yml + +- name: syntax-spec + color: 006b75 + description: syntax-matrix.json or canonical spec change +- name: textmate + color: 1d76db + description: TextMate grammar generation or parity +- name: editor-support + color: 5319e7 + description: editor-support configs (Sublime, JetBrains, etc.) +- name: vscode + color: 0078d4 + description: VSCode extension or grammar package +- name: sublime + color: ff9800 + description: Sublime Text highlighting or config +- name: jetbrains + color: 000000 + description: JetBrains IDE highlighting or config +- name: neovim + color: 57a143 + description: Neovim editor-support config +- name: helix + color: 675b2d + description: Helix editor-support config diff --git a/labels/mux-website-api.yml b/labels/mux-website-api.yml new file mode 100644 index 0000000..a3d7ad9 --- /dev/null +++ b/labels/mux-website-api.yml @@ -0,0 +1,11 @@ +# mux-website-api overlay on labels.yml + +- name: security + color: b60205 + description: Sandbox, auth, rate limits, or untrusted code execution +- name: sandbox + color: d93f0b + description: Compile/run isolation or resource limits +- name: deployment + color: fbca04 + description: Fly.io deploy, Docker image, or MUX_VERSION pin diff --git a/labels/mux-website.yml b/labels/mux-website.yml new file mode 100644 index 0000000..320d94e --- /dev/null +++ b/labels/mux-website.yml @@ -0,0 +1,14 @@ +# mux-website overlay on labels.yml + +- name: playground + color: 1d76db + description: In-browser playground UI or behavior +- name: docs-site + color: 0075ca + description: Docusaurus docs site content or layout +- name: mux-ai + color: 5319e7 + description: Docs AI assistant worker or indexing +- name: docusaurus + color: 0e8a16 + description: Docusaurus build, config, or tooling diff --git a/labels/tree-sitter-mux.yml b/labels/tree-sitter-mux.yml new file mode 100644 index 0000000..f05103a --- /dev/null +++ b/labels/tree-sitter-mux.yml @@ -0,0 +1,20 @@ +# tree-sitter-mux overlay on labels.yml + +- name: grammar + color: 006b75 + description: grammar.js or parser behavior +- name: queries + color: 5319e7 + description: Highlight or query .scm files +- name: syntax-matrix + color: 1d76db + description: Vendored syntax-matrix.json sync or drift +- name: neovim + color: 57a143 + description: Neovim / nvim-treesitter integration +- name: helix + color: 675b2d + description: Helix grammar or query integration +- name: emacs + color: 7b1fa2 + description: Emacs tree-sitter integration diff --git a/scripts/clear-milestones.sh b/scripts/clear-milestones.sh new file mode 100755 index 0000000..553c32f --- /dev/null +++ b/scripts/clear-milestones.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# Bulk-clear milestones from all issues in a repo (issues are not deleted). +# Usage: ./scripts/clear-milestones.sh +set -euo pipefail + +REPO="${1:?usage: clear-milestones.sh }" +FULL="muxlang/$REPO" + +echo "Clearing milestones on $FULL ..." +gh api "repos/$FULL/issues?state=all&per_page=100" --paginate \ + --jq '.[] | select(.milestone != null) | .number' | while read -r num; do + id="$(gh issue view "$num" --repo "$FULL" --json id -q .id)" + gh api graphql -f query=" + mutation { + clearMilestone(input: {issueId: \"$id\"}) { + issue { number } + } + }" + echo " cleared #$num" +done + +echo "Closing milestones on $FULL ..." +gh api "repos/$FULL/milestones?state=all" --jq '.[].number' | while read -r n; do + gh api -X PATCH "repos/$FULL/milestones/$n" -f state=closed + echo " closed milestone #$n" +done + +echo "Done." diff --git a/scripts/retire-labels.sh b/scripts/retire-labels.sh new file mode 100755 index 0000000..df18ca8 --- /dev/null +++ b/scripts/retire-labels.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# Delete retired labels from all muxlang repos. +set -euo pipefail + +REPOS=( + mux-compiler mux-runtime mux-website-api mux-syntax-highlighting + mux-website tree-sitter-mux mux-context .github +) +RETIRED=( + "priority: urgent" "priority: high" "priority: medium" "priority: low" + "needs tested" "bug" "feature" +) + +for repo in "${REPOS[@]}"; do + echo "Retiring labels on muxlang/$repo ..." + for label in "${RETIRED[@]}"; do + gh label delete "$label" --repo "muxlang/$repo" --yes 2>/dev/null || true + done +done + +echo "Done." diff --git a/scripts/sync-labels.sh b/scripts/sync-labels.sh new file mode 100755 index 0000000..ad7494a --- /dev/null +++ b/scripts/sync-labels.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +# Apply canonical labels from labels/*.yml to muxlang repos. +# Usage: ./scripts/sync-labels.sh [repo ...] +# With no args, syncs every repo in ALL_REPOS below. +set -euo pipefail + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +ALL_REPOS=( + mux-compiler + mux-runtime + mux-website-api + mux-syntax-highlighting + mux-website + tree-sitter-mux + mux-context + .github +) + +apply_yaml() { + local repo="$1" + local file="$2" + local name="" color="" description="" + + while IFS= read -r line; do + case "$line" in + "- name:"*) + name="${line#- name:}" + name="${name#\"}" + name="${name%\"}" + name="${name#"${name%%[![:space:]]*}"}" + name="${name%"${name##*[![:space:]]}"}" + ;; + " color:"*) + color="${line# color: }" + color="${color#\"}" + color="${color%\"}" + ;; + " description:"*) + description="${line# description: }" + if [[ -n "$name" && -n "$color" ]]; then + gh label create "$name" \ + --repo "muxlang/$repo" \ + --color "$color" \ + --description "$description" \ + --force + name="" + color="" + description="" + fi + ;; + esac + done < "$file" +} + +sync_repo() { + local repo="$1" + echo "Syncing muxlang/$repo ..." + apply_yaml "$repo" "$ROOT/labels/labels.yml" + if [[ -f "$ROOT/labels/$repo.yml" ]]; then + apply_yaml "$repo" "$ROOT/labels/$repo.yml" + fi +} + +if [[ "$#" -gt 0 ]]; then + TARGETS=("$@") +else + TARGETS=("${ALL_REPOS[@]}") +fi + +for repo in "${TARGETS[@]}"; do + sync_repo "$repo" +done + +echo "Done." diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.md b/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..79b63b6 --- /dev/null +++ b/templates/mux-compiler/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Report incorrect compiler behavior or a crash +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Description + + + +## Steps to reproduce + +1. +2. +3. + +## Expected behavior + +## Actual behavior + + + +## Minimal example + +```mux + +``` + +## Environment + +- `mux --version`: +- OS / architecture: diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/config.yml b/templates/mux-compiler/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..34adc06 --- /dev/null +++ b/templates/mux-compiler/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Documentation + url: https://mux-lang.dev + about: Read the Mux language docs before filing an issue. diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.md b/templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.md new file mode 100644 index 0000000..ad03a42 --- /dev/null +++ b/templates/mux-compiler/ISSUE_TEMPLATE/documentation_fix.md @@ -0,0 +1,17 @@ +--- +name: Documentation fix +about: Report incorrect or missing compiler documentation +title: "" +labels: "documentation, needs triage" +assignees: DerekCorniello +--- + +## What is wrong + + + +## Expected content + +## Links + + diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/feature_request.md b/templates/mux-compiler/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..91ef30d --- /dev/null +++ b/templates/mux-compiler/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest a new language or compiler capability +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Problem + + + +## Proposed solution + +## Alternatives considered + +## Additional context diff --git a/templates/mux-context/ISSUE_TEMPLATE/adr_proposal.md b/templates/mux-context/ISSUE_TEMPLATE/adr_proposal.md new file mode 100644 index 0000000..fdfa9ac --- /dev/null +++ b/templates/mux-context/ISSUE_TEMPLATE/adr_proposal.md @@ -0,0 +1,15 @@ +--- +name: ADR or design proposal +about: Propose an architecture decision or cross-repo design change +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Problem + +## Proposal + +## Alternatives considered + +## Affected repos diff --git a/templates/mux-context/ISSUE_TEMPLATE/config.yml b/templates/mux-context/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..34adc06 --- /dev/null +++ b/templates/mux-context/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Documentation + url: https://mux-lang.dev + about: Read the Mux language docs before filing an issue. diff --git a/templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.md b/templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.md new file mode 100644 index 0000000..2764e60 --- /dev/null +++ b/templates/mux-context/ISSUE_TEMPLATE/cross_repo_question.md @@ -0,0 +1,13 @@ +--- +name: Cross-repo question +about: Unsure which repo, or the work spans multiple repos +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Question + +## Which repos might this touch? + +## Additional context diff --git a/templates/mux-runtime/ISSUE_TEMPLATE/bug_report.md b/templates/mux-runtime/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..5ac59d3 --- /dev/null +++ b/templates/mux-runtime/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,25 @@ +--- +name: Bug report +about: Report a runtime crash, incorrect stdlib behavior, or FFI issue +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Description + +## Steps to reproduce + +1. +2. +3. + +## Expected behavior + +## Actual behavior + +## Environment + +- `mux-runtime` version (if known): +- OS / architecture: +- Minimal repro (Rust or compiled Mux program): diff --git a/templates/mux-runtime/ISSUE_TEMPLATE/config.yml b/templates/mux-runtime/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..34adc06 --- /dev/null +++ b/templates/mux-runtime/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Documentation + url: https://mux-lang.dev + about: Read the Mux language docs before filing an issue. diff --git a/templates/mux-runtime/ISSUE_TEMPLATE/feature_request.md b/templates/mux-runtime/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..f9526bc --- /dev/null +++ b/templates/mux-runtime/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest a stdlib or runtime API addition +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Problem + +## Proposed API or behavior + +## Feature flags + + + +## Additional context diff --git a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.md b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..3f42578 --- /dev/null +++ b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Report incorrect syntax highlighting or editor config +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Description + +## Affected editor(s) + +- [ ] VSCode +- [ ] Sublime Text +- [ ] JetBrains +- [ ] Neovim (editor-support) +- [ ] Helix (editor-support) +- [ ] Other: + +## Steps to reproduce + +1. Code sample: +2. What is highlighted wrong: + +## Expected highlighting + +## Environment + +- Extension or config version (if known): diff --git a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/config.yml b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..34adc06 --- /dev/null +++ b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Documentation + url: https://mux-lang.dev + about: Read the Mux language docs before filing an issue. diff --git a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md new file mode 100644 index 0000000..b40edee --- /dev/null +++ b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md @@ -0,0 +1,29 @@ +--- +name: Syntax spec change +about: Propose a change to syntax-matrix.json (canonical spec) +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Motivation + + + +## Proposed change + + + +## Downstream sync checklist + + + +- [ ] Regenerate TextMate grammar and editor-support in this repo +- [ ] Update tree-sitter-mux vendored syntax-matrix.json +- [ ] Update mux-website Monaco and Shiki definitions + +## Example code + +```mux + +``` diff --git a/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.md b/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..de382ab --- /dev/null +++ b/templates/mux-website-api/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,21 @@ +--- +name: Bug report +about: Report incorrect compile/run behavior from the playground API +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Description + +## Steps to reproduce + +1. Mux source (minimal): +2. Request or endpoint: +3. Response or error: + +## Expected behavior + +## Environment + +- Deployed API version or MUX_VERSION pin (if known): diff --git a/templates/mux-website-api/ISSUE_TEMPLATE/config.yml b/templates/mux-website-api/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..34adc06 --- /dev/null +++ b/templates/mux-website-api/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Documentation + url: https://mux-lang.dev + about: Read the Mux language docs before filing an issue. diff --git a/templates/mux-website-api/ISSUE_TEMPLATE/security_report.md b/templates/mux-website-api/ISSUE_TEMPLATE/security_report.md new file mode 100644 index 0000000..e5fab0e --- /dev/null +++ b/templates/mux-website-api/ISSUE_TEMPLATE/security_report.md @@ -0,0 +1,19 @@ +--- +name: Security report +about: Report a sandbox, rate-limit, or untrusted-code execution concern +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Summary + + + +## Impact + + + +## Steps to reproduce + +## Suggested mitigation diff --git a/templates/mux-website/ISSUE_TEMPLATE/bug_report.md b/templates/mux-website/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..a5fab35 --- /dev/null +++ b/templates/mux-website/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,22 @@ +--- +name: Bug report +about: Report a bug on mux-lang.dev or the playground +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Description + +## Steps to reproduce + +1. URL or page: +2. Action taken: +3. What happened: + +## Expected behavior + +## Environment + +- Browser: +- OS: diff --git a/templates/mux-website/ISSUE_TEMPLATE/config.yml b/templates/mux-website/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..34adc06 --- /dev/null +++ b/templates/mux-website/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Documentation + url: https://mux-lang.dev + about: Read the Mux language docs before filing an issue. diff --git a/templates/mux-website/ISSUE_TEMPLATE/documentation_fix.md b/templates/mux-website/ISSUE_TEMPLATE/documentation_fix.md new file mode 100644 index 0000000..fb36bf7 --- /dev/null +++ b/templates/mux-website/ISSUE_TEMPLATE/documentation_fix.md @@ -0,0 +1,13 @@ +--- +name: Documentation fix +about: Report incorrect or missing content on mux-lang.dev +title: "" +labels: "documentation, needs triage" +assignees: DerekCorniello +--- + +## Page URL + +## What is wrong + +## Expected content diff --git a/templates/mux-website/ISSUE_TEMPLATE/feature_request.md b/templates/mux-website/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..3d7f090 --- /dev/null +++ b/templates/mux-website/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,13 @@ +--- +name: Feature request +about: Suggest a docs site or playground improvement +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Problem + +## Proposed solution + +## Additional context diff --git a/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.md b/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..a87a678 --- /dev/null +++ b/templates/tree-sitter-mux/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,28 @@ +--- +name: Bug report +about: Report a parse error, crash, or incorrect highlight query +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Description + +## Affected editor(s) + +- [ ] Neovim (nvim-treesitter) +- [ ] Helix +- [ ] Emacs +- [ ] Other: + +## Steps to reproduce + +1. Code sample: +2. Command or action: +3. Actual result: + +## Expected result + +## Environment + +- tree-sitter-cli version: diff --git a/templates/tree-sitter-mux/ISSUE_TEMPLATE/config.yml b/templates/tree-sitter-mux/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..34adc06 --- /dev/null +++ b/templates/tree-sitter-mux/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Documentation + url: https://mux-lang.dev + about: Read the Mux language docs before filing an issue. diff --git a/templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.md b/templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.md new file mode 100644 index 0000000..0eb007d --- /dev/null +++ b/templates/tree-sitter-mux/ISSUE_TEMPLATE/grammar_sync.md @@ -0,0 +1,20 @@ +--- +name: Grammar sync +about: Track syncing the vendored syntax-matrix.json from mux-syntax-highlighting +title: "" +labels: needs triage +assignees: DerekCorniello +--- + +## Context + + + +## Current state + +- [ ] syntax-matrix.json updated in this repo +- [ ] grammar.js regenerated +- [ ] queries/highlights.scm updated +- [ ] tree-sitter test passes + +## Notes From 30e0719eb163990aa1d6ed09023cb066aa643410 Mon Sep 17 00:00:00 2001 From: Derek Corniello Date: Fri, 3 Jul 2026 17:16:28 -0700 Subject: [PATCH 2/8] fix: use updateIssue mutation to clear milestones Co-authored-by: Cursor --- scripts/clear-milestones.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/clear-milestones.sh b/scripts/clear-milestones.sh index 553c32f..6cbcbb2 100755 --- a/scripts/clear-milestones.sh +++ b/scripts/clear-milestones.sh @@ -12,7 +12,7 @@ gh api "repos/$FULL/issues?state=all&per_page=100" --paginate \ id="$(gh issue view "$num" --repo "$FULL" --json id -q .id)" gh api graphql -f query=" mutation { - clearMilestone(input: {issueId: \"$id\"}) { + updateIssue(input: {id: \"$id\", milestoneId: null}) { issue { number } } }" From a02ced4e719d7fb39a6e39669642000519e15a7e Mon Sep 17 00:00:00 2001 From: Derek Corniello Date: Fri, 3 Jul 2026 17:25:40 -0700 Subject: [PATCH 3/8] fix: disable blank issues so templates always apply needs triage Also route mux-website-api security reports through private GitHub Security Advisories instead of a public issue template. Co-authored-by: Cursor --- ISSUE_TEMPLATE/config.yml | 2 +- .../mux-compiler/ISSUE_TEMPLATE/config.yml | 2 +- .../mux-context/ISSUE_TEMPLATE/config.yml | 2 +- .../mux-runtime/ISSUE_TEMPLATE/config.yml | 2 +- .../ISSUE_TEMPLATE/config.yml | 2 +- .../mux-website-api/ISSUE_TEMPLATE/config.yml | 5 ++++- .../ISSUE_TEMPLATE/security_report.md | 19 ------------------- .../mux-website/ISSUE_TEMPLATE/config.yml | 2 +- .../tree-sitter-mux/ISSUE_TEMPLATE/config.yml | 2 +- 9 files changed, 11 insertions(+), 27 deletions(-) delete mode 100644 templates/mux-website-api/ISSUE_TEMPLATE/security_report.md diff --git a/ISSUE_TEMPLATE/config.yml b/ISSUE_TEMPLATE/config.yml index 34adc06..7c57e46 100644 --- a/ISSUE_TEMPLATE/config.yml +++ b/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: Documentation url: https://mux-lang.dev diff --git a/templates/mux-compiler/ISSUE_TEMPLATE/config.yml b/templates/mux-compiler/ISSUE_TEMPLATE/config.yml index 34adc06..7c57e46 100644 --- a/templates/mux-compiler/ISSUE_TEMPLATE/config.yml +++ b/templates/mux-compiler/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: Documentation url: https://mux-lang.dev diff --git a/templates/mux-context/ISSUE_TEMPLATE/config.yml b/templates/mux-context/ISSUE_TEMPLATE/config.yml index 34adc06..7c57e46 100644 --- a/templates/mux-context/ISSUE_TEMPLATE/config.yml +++ b/templates/mux-context/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: Documentation url: https://mux-lang.dev diff --git a/templates/mux-runtime/ISSUE_TEMPLATE/config.yml b/templates/mux-runtime/ISSUE_TEMPLATE/config.yml index 34adc06..7c57e46 100644 --- a/templates/mux-runtime/ISSUE_TEMPLATE/config.yml +++ b/templates/mux-runtime/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: Documentation url: https://mux-lang.dev diff --git a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/config.yml b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/config.yml index 34adc06..7c57e46 100644 --- a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/config.yml +++ b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: Documentation url: https://mux-lang.dev diff --git a/templates/mux-website-api/ISSUE_TEMPLATE/config.yml b/templates/mux-website-api/ISSUE_TEMPLATE/config.yml index 34adc06..edca781 100644 --- a/templates/mux-website-api/ISSUE_TEMPLATE/config.yml +++ b/templates/mux-website-api/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,8 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: Documentation url: https://mux-lang.dev about: Read the Mux language docs before filing an issue. + - name: Report a security vulnerability + url: https://github.com/muxlang/mux-website-api/security/advisories/new + about: Report sandbox or security issues privately via GitHub Security Advisories. diff --git a/templates/mux-website-api/ISSUE_TEMPLATE/security_report.md b/templates/mux-website-api/ISSUE_TEMPLATE/security_report.md deleted file mode 100644 index e5fab0e..0000000 --- a/templates/mux-website-api/ISSUE_TEMPLATE/security_report.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: Security report -about: Report a sandbox, rate-limit, or untrusted-code execution concern -title: "" -labels: needs triage -assignees: DerekCorniello ---- - -## Summary - - - -## Impact - - - -## Steps to reproduce - -## Suggested mitigation diff --git a/templates/mux-website/ISSUE_TEMPLATE/config.yml b/templates/mux-website/ISSUE_TEMPLATE/config.yml index 34adc06..7c57e46 100644 --- a/templates/mux-website/ISSUE_TEMPLATE/config.yml +++ b/templates/mux-website/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: Documentation url: https://mux-lang.dev diff --git a/templates/tree-sitter-mux/ISSUE_TEMPLATE/config.yml b/templates/tree-sitter-mux/ISSUE_TEMPLATE/config.yml index 34adc06..7c57e46 100644 --- a/templates/tree-sitter-mux/ISSUE_TEMPLATE/config.yml +++ b/templates/tree-sitter-mux/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: Documentation url: https://mux-lang.dev From 370c7a19aeb7e1d35349c55d43674ea478819eed Mon Sep 17 00:00:00 2001 From: Derek Corniello Date: Fri, 3 Jul 2026 17:31:56 -0700 Subject: [PATCH 4/8] fix: add sync-templates.sh, paginate milestone close, shared triage bootstrap Co-authored-by: Cursor --- README.md | 4 +++- scripts/clear-milestones.sh | 2 +- scripts/sync-templates.sh | 24 ++++++++++++++++++++ templates/shared/labels.yml | 7 ++++++ templates/shared/workflows/issue-triage.yml | 25 +++++++++++++++++++++ 5 files changed, 60 insertions(+), 2 deletions(-) create mode 100755 scripts/sync-templates.sh create mode 100644 templates/shared/labels.yml create mode 100644 templates/shared/workflows/issue-triage.yml diff --git a/README.md b/README.md index 452d63f..2e54895 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,13 @@ Organization-level defaults for the [muxlang](https://github.com/muxlang) org: - `labels/` - canonical label YAML and per-repo overlays. - `templates//` - canonical issue template sources synced to each repo. - `scripts/sync-labels.sh` - apply label YAML to org repos (`gh` CLI required). +- `scripts/sync-templates.sh` - copy `templates//` into a repo checkout. - `scripts/retire-labels.sh` - delete retired labels org-wide. - `scripts/clear-milestones.sh` - bulk-clear milestones from a repo's issues. Policy and workflow rules: [mux-context/docs/repo-governance.md](https://github.com/muxlang/mux-context/blob/main/docs/repo-governance.md). -Per-repo `.github/ISSUE_TEMPLATE/` files are synced from `templates/` here. +Per-repo `.github/ISSUE_TEMPLATE/`, `.github/workflows/issue-triage.yml`, and +`.github/labels.yml` are synced from `templates/` here via `scripts/sync-templates.sh`. Do not copy templates or invent labels in individual repos. diff --git a/scripts/clear-milestones.sh b/scripts/clear-milestones.sh index 6cbcbb2..c0b2f7b 100755 --- a/scripts/clear-milestones.sh +++ b/scripts/clear-milestones.sh @@ -20,7 +20,7 @@ gh api "repos/$FULL/issues?state=all&per_page=100" --paginate \ done echo "Closing milestones on $FULL ..." -gh api "repos/$FULL/milestones?state=all" --jq '.[].number' | while read -r n; do +gh api "repos/$FULL/milestones?state=all&per_page=100" --paginate --jq '.[].number' | while read -r n; do gh api -X PATCH "repos/$FULL/milestones/$n" -f state=closed echo " closed milestone #$n" done diff --git a/scripts/sync-templates.sh b/scripts/sync-templates.sh new file mode 100755 index 0000000..51859c1 --- /dev/null +++ b/scripts/sync-templates.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# Copy canonical issue templates (and shared bootstrap files) into a repo checkout. +# Usage: ./scripts/sync-templates.sh +# +# Example: +# ./scripts/sync-templates.sh mux-runtime ../mux-runtime +set -euo pipefail + +REPO="${1:?usage: sync-templates.sh }" +DEST="${2:?usage: sync-templates.sh }" +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +SRC="$ROOT/templates/$REPO/ISSUE_TEMPLATE" + +if [[ ! -d "$SRC" ]]; then + echo "error: no templates for repo '$REPO' at $SRC" >&2 + exit 1 +fi + +mkdir -p "$DEST/.github/ISSUE_TEMPLATE" "$DEST/.github/workflows" +cp -r "$SRC/." "$DEST/.github/ISSUE_TEMPLATE/" +cp "$ROOT/templates/shared/workflows/issue-triage.yml" "$DEST/.github/workflows/issue-triage.yml" +cp "$ROOT/templates/shared/labels.yml" "$DEST/.github/labels.yml" + +echo "Synced templates, issue-triage workflow, and labels bootstrap to $DEST" diff --git a/templates/shared/labels.yml b/templates/shared/labels.yml new file mode 100644 index 0000000..bae0a34 --- /dev/null +++ b/templates/shared/labels.yml @@ -0,0 +1,7 @@ +# Bootstrap label list for this repo. Issue templates depend on `needs triage`. +# Full canonical set lives in muxlang/.github/labels/; apply with: +# cd muxlang/.github && ./scripts/sync-labels.sh + +- name: needs triage + color: ededed + description: Not yet reviewed or categorized diff --git a/templates/shared/workflows/issue-triage.yml b/templates/shared/workflows/issue-triage.yml new file mode 100644 index 0000000..a08a546 --- /dev/null +++ b/templates/shared/workflows/issue-triage.yml @@ -0,0 +1,25 @@ +name: Issue triage + +on: + issues: + types: [opened] + +permissions: + issues: write + +jobs: + ensure-triage-label: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + script: | + const names = context.payload.issue.labels.map((label) => label.name); + if (!names.includes('needs triage')) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + labels: ['needs triage'], + }); + } From 4ed052d6fc455da301c2b8470af70cc08e576f39 Mon Sep 17 00:00:00 2001 From: Derek Corniello Date: Fri, 3 Jul 2026 18:06:24 -0700 Subject: [PATCH 5/8] fix: filter out PRs from milestone clearing loop --- scripts/clear-milestones.sh | 2 +- templates/shared/workflows/issue-triage.yml | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/scripts/clear-milestones.sh b/scripts/clear-milestones.sh index c0b2f7b..d06b3e4 100755 --- a/scripts/clear-milestones.sh +++ b/scripts/clear-milestones.sh @@ -8,7 +8,7 @@ FULL="muxlang/$REPO" echo "Clearing milestones on $FULL ..." gh api "repos/$FULL/issues?state=all&per_page=100" --paginate \ - --jq '.[] | select(.milestone != null) | .number' | while read -r num; do + --jq '.[] | select(.milestone != null and (.pull_request | not)) | .number' | while read -r num; do id="$(gh issue view "$num" --repo "$FULL" --json id -q .id)" gh api graphql -f query=" mutation { diff --git a/templates/shared/workflows/issue-triage.yml b/templates/shared/workflows/issue-triage.yml index a08a546..0e7a096 100644 --- a/templates/shared/workflows/issue-triage.yml +++ b/templates/shared/workflows/issue-triage.yml @@ -14,12 +14,28 @@ jobs: - uses: actions/github-script@v7 with: script: | + const labelName = 'needs triage'; + try { + await github.rest.labels.get({ + owner: context.repo.owner, + repo: context.repo.repo, + name: labelName, + }); + } catch { + await github.rest.labels.create({ + owner: context.repo.owner, + repo: context.repo.repo, + name: labelName, + color: 'ededed', + description: 'Not yet reviewed or categorized', + }); + } const names = context.payload.issue.labels.map((label) => label.name); - if (!names.includes('needs triage')) { + if (!names.includes(labelName)) { await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.issue.number, - labels: ['needs triage'], + labels: [labelName], }); } From f544ad7d05e33c0feeb5369cae398ecbb7b06a8b Mon Sep 17 00:00:00 2001 From: Derek Corniello Date: Fri, 3 Jul 2026 18:14:09 -0700 Subject: [PATCH 6/8] fix: handle label creation race and auto-assign unassigned issues --- templates/shared/workflows/issue-triage.yml | 28 +++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/templates/shared/workflows/issue-triage.yml b/templates/shared/workflows/issue-triage.yml index 0e7a096..7e1cae8 100644 --- a/templates/shared/workflows/issue-triage.yml +++ b/templates/shared/workflows/issue-triage.yml @@ -22,13 +22,19 @@ jobs: name: labelName, }); } catch { - await github.rest.labels.create({ - owner: context.repo.owner, - repo: context.repo.repo, - name: labelName, - color: 'ededed', - description: 'Not yet reviewed or categorized', - }); + try { + await github.rest.labels.create({ + owner: context.repo.owner, + repo: context.repo.repo, + name: labelName, + color: 'ededed', + description: 'Not yet reviewed or categorized', + }); + } catch (createError) { + if (createError.status !== 422) { + throw createError; + } + } } const names = context.payload.issue.labels.map((label) => label.name); if (!names.includes(labelName)) { @@ -39,3 +45,11 @@ jobs: labels: [labelName], }); } + if (!context.payload.issue.assignee) { + await github.rest.issues.addAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + assignees: ['DerekCorniello'], + }); + } From e2946b235ec1d5b6dd1b99e3ec43e567883c43aa Mon Sep 17 00:00:00 2001 From: Derek Corniello Date: Fri, 3 Jul 2026 18:27:26 -0700 Subject: [PATCH 7/8] fix: auto-apply documentation label for docs issues --- templates/shared/workflows/issue-triage.yml | 60 ++++++++++++--------- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/templates/shared/workflows/issue-triage.yml b/templates/shared/workflows/issue-triage.yml index 7e1cae8..15957d0 100644 --- a/templates/shared/workflows/issue-triage.yml +++ b/templates/shared/workflows/issue-triage.yml @@ -15,36 +15,42 @@ jobs: with: script: | const labelName = 'needs triage'; - try { - await github.rest.labels.get({ - owner: context.repo.owner, - repo: context.repo.repo, - name: labelName, - }); - } catch { + const ensureLabel = async (name, color, description) => { try { - await github.rest.labels.create({ + await github.rest.labels.get({ owner: context.repo.owner, repo: context.repo.repo, - name: labelName, - color: 'ededed', - description: 'Not yet reviewed or categorized', + name, }); - } catch (createError) { - if (createError.status !== 422) { - throw createError; + } catch { + try { + await github.rest.labels.create({ + owner: context.repo.owner, + repo: context.repo.repo, + name, + color, + description, + }); + } catch (createError) { + if (createError.status !== 422) { + throw createError; + } } } - } - const names = context.payload.issue.labels.map((label) => label.name); - if (!names.includes(labelName)) { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - labels: [labelName], - }); - } + }; + const applyLabelIfMissing = async (name) => { + const names = context.payload.issue.labels.map((label) => label.name); + if (!names.includes(name)) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + labels: [name], + }); + } + }; + await ensureLabel(labelName, 'ededed', 'Not yet reviewed or categorized'); + await applyLabelIfMissing(labelName); if (!context.payload.issue.assignee) { await github.rest.issues.addAssignees({ owner: context.repo.owner, @@ -53,3 +59,9 @@ jobs: assignees: ['DerekCorniello'], }); } + const title = context.payload.issue.title; + const body = context.payload.issue.body || ''; + if (/^docs?[:/\s]/i.test(title) || /documentation/i.test(title + ' ' + body)) { + await ensureLabel('documentation', '0075ca', 'Improvements or additions to documentation'); + await applyLabelIfMissing('documentation'); + } From d5825942032910f4a5ab27211a0ff3805136b800 Mon Sep 17 00:00:00 2001 From: Derek Corniello Date: Fri, 3 Jul 2026 18:34:40 -0700 Subject: [PATCH 8/8] fix: correct label API endpoints and widen docs detection --- scripts/sync-templates.sh | 1 + .../ISSUE_TEMPLATE/syntax_spec_change.md | 3 ++- templates/shared/workflows/issue-triage.yml | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/sync-templates.sh b/scripts/sync-templates.sh index 51859c1..f2b223e 100755 --- a/scripts/sync-templates.sh +++ b/scripts/sync-templates.sh @@ -16,6 +16,7 @@ if [[ ! -d "$SRC" ]]; then exit 1 fi +rm -rf "$DEST/.github/ISSUE_TEMPLATE" mkdir -p "$DEST/.github/ISSUE_TEMPLATE" "$DEST/.github/workflows" cp -r "$SRC/." "$DEST/.github/ISSUE_TEMPLATE/" cp "$ROOT/templates/shared/workflows/issue-triage.yml" "$DEST/.github/workflows/issue-triage.yml" diff --git a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md index b40edee..f106902 100644 --- a/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md +++ b/templates/mux-syntax-highlighting/ISSUE_TEMPLATE/syntax_spec_change.md @@ -19,7 +19,8 @@ assignees: DerekCorniello - [ ] Regenerate TextMate grammar and editor-support in this repo -- [ ] Update tree-sitter-mux vendored syntax-matrix.json +- [ ] Verify generated artifacts with `node scripts/check-parity.js` and `node scripts/build-editor-support.js --check` +- [ ] Update tree-sitter-mux vendored syntax-matrix.json and regenerated `queries/highlights.scm` - [ ] Update mux-website Monaco and Shiki definitions ## Example code diff --git a/templates/shared/workflows/issue-triage.yml b/templates/shared/workflows/issue-triage.yml index 15957d0..24ebbca 100644 --- a/templates/shared/workflows/issue-triage.yml +++ b/templates/shared/workflows/issue-triage.yml @@ -17,14 +17,14 @@ jobs: const labelName = 'needs triage'; const ensureLabel = async (name, color, description) => { try { - await github.rest.labels.get({ + await github.rest.issues.getLabel({ owner: context.repo.owner, repo: context.repo.repo, name, }); } catch { try { - await github.rest.labels.create({ + await github.rest.issues.createLabel({ owner: context.repo.owner, repo: context.repo.repo, name, @@ -61,7 +61,7 @@ jobs: } const title = context.payload.issue.title; const body = context.payload.issue.body || ''; - if (/^docs?[:/\s]/i.test(title) || /documentation/i.test(title + ' ' + body)) { + if (/^docs?[:/\s]/i.test(title) || /documentation/i.test(title + ' ' + body) || /What is wrong|Expected content|Page URL/i.test(body)) { await ensureLabel('documentation', '0075ca', 'Improvements or additions to documentation'); await applyLabelIfMissing('documentation'); }