Skip to content

fix(github): fix issue auto-labeling, templates, and add scripts CI - #2944

Open
7ui77 wants to merge 1 commit into
lnreader:masterfrom
7ui77:fix/issue-templates-and-label-workflows
Open

7ui77 wants to merge 1 commit into
lnreader:masterfrom
7ui77:fix/issue-templates-and-label-workflows

Conversation

@7ui77

@7ui77 7ui77 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Checklist

  • Update version code if an existing plugin was modified (N/A — workflow, issue template, and dev tooling changes only)
  • Test changes in Plugin Playground or the app (verified via node .github/scripts/check-github.cjs --require-actionlint: test:scripts [16/16], Prettier, ESLint, validate-github-yaml.py [17/17], and actionlint)
  • Reference related issues in the PR body (proactive maintenance audit; fixes root causes observed on e.g. NovelBuddy JSON Parse error #2296, 69shuba(chinese) #1866)
  • Commit messages follow type(scope): description

Summary

This PR covers issue parsing, auto-labeling, issue templates, and GitHub scripts CI:

.github/
├── ISSUE_TEMPLATE/
│   └── request_feature.yml                # removes stale 1.1.19 version link -> releases/latest
├── scripts/
│   ├── issue-parsing.cjs                  # shared heading, severity, author/repo/label validation & plugin matcher helpers
│   ├── auto-label-issue.cjs               # 50-char label truncation, add/remove reconciliation, expanded languages
│   ├── auto-label-issue.test.cjs          # 14 unit tests (50-char invariant, CJK/Arabic, reconciliation, CLI, renderer)
│   ├── generate-issue-index.cjs           # reuses issue-parsing.cjs & buildSelectionMatcher
│   ├── generate-issue-index.test.cjs      # 2 unit tests for full & incremental index updates
│   ├── generate-issue-template-options.cjs# exports renderIssueTemplate; guards main() behind require.main
│   ├── validate-github-yaml.py            # shared UniqueKeyLoader + Issue Form schema validator for CI and local check:github
│   ├── check-github.cjs                   # all-in-one local CI runner (`npm run check:github`)
│   └── blank_report_issue.yml             # placeholder 2.1.4 + latest release link
└── workflows/
    ├── issue_auto_label.yml               # triggers on opened/edited/labeled; syncs add/remove labels via API; cancel-in-progress: false
    ├── generate-issue-index.yml           # watches issue-parsing.cjs
    └── github-scripts-check.yml           # PR CI: script tests + clean-tree guard, ESLint/Prettier, validate-github-yaml.py, actionlint
package.json                               # adds test:scripts & check:github; adds cjs/mjs to format/format:check & lint-staged
AGENTS.md                                  # adds .github/scripts pointer (`test:scripts`, `check:github`)
CODING_STANDARDS.md                        # adds concise GitHub workflows & scripts standards for auto-labeling & parsing

Key fixes:

  • Stop spawning bare plugin: labels, fix CJK/Arabic matching & enforce GitHub 50-char limit: auto-label-issue.cjs shares matchPluginEntries / buildSelectionMatcher via issue-parsing.cjs (handling \u200e LRM Arabic controls, comma-containing Chinese/Korean prefixes, and colons inside names like Re:Library), truncates long plugin labels to <= 50 chars while preserving [cleanId] for generate-issue-index.cjs (preventing batch API 422 errors across all 374 keys.json entries), and computes { add, remove } reconciliation (computeLabelPlan) on opened, edited, and labeled.
  • Prevent unrelated labeled events from cancelling active label syncs: issue_auto_label.yml sets concurrency.cancel-in-progress: false so skipped labeled events do not cancel an in-flight sync run.
  • Enable language: auto-labeling on plugin requests: expands LANGUAGE_ALIASES (+10 languages + delimited primary language parsing), preserves manually added unlisted language: * labels via MANAGED_LANGUAGE_LABELS, and safely pre-creates missing language: * labels with #ADD8E6.
  • Update stale template links: updates blank_report_issue.yml and request_feature.yml to releases/latest and 2.1.4.
  • Hardened .github/ CI & local parity (github-scripts-check.yml, check:github): triggers on PRs without a workflow-level paths: filter (safe as a Required Status Check via an in-job fetch-depth: 2 .github/ diff gate), enforces clean-tree after node --test, Prettier + ESLint (--max-warnings 0) on .github/scripts/*.cjs, shared validate-github-yaml.py (UniqueKeyLoader + Issue Form schema validation on renderIssueTemplate(blank_report_issue.yml, keys.json)), direct report_issue.yml PR-edit guard, SHA-256-verified actionlint v1.7.12 (temporarily ignoring pre-existing SC2086:info: in untouched theme_auto_label.yml, to be removed in follow-up PR 3), local npm run check:github parity (check-github.cjs), and .cjs/.mjs in format/format:check.

Evidence

  • node .github/scripts/check-github.cjs --require-actionlint:
    • node --test .github/scripts/*.test.cjs: 16/16 passing (auto-label-issue.test.cjs + generate-issue-index.test.cjs)
    • Prettier + ESLint (--max-warnings 0) on .github/scripts/*.cjs: 0 errors, 0 warnings
    • validate-github-yaml.py (UniqueKeyLoader + Issue Form schema): 17/17 YAML files validated (including rendered blank_report_issue.yml)
    • actionlint across .github/workflows/*.yml: 0 errors, 0 warnings

Merge Danger

Door: Two-way
Blast Radius: Narrow (GitHub issue auto-labeling, issue index helper reuse, templates, docs, and .github/ CI only).

AI-assisted (Antigravity / Gemini).

@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5RetriggerView in Greptile

[Medium impact] The changes affect GitHub issue automation and the repository's GitHub tooling checks.

Fetch the current issue before computing label changes so queued edits cannot leave conflicting labels.

Findings

  1. P1 Queued edits leave conflicting labels ▶

Summary

This PR moves issue matching into shared helpers and adds label reconciliation.

  • GitHub issue labels now track the form answers.
  • The issue index now uses the shared issue parser.
  • Issue forms now point people to the latest app release.
  • GitHub script changes now get local and pull-request checks.

Reviews (7) · Last reviewed commit: "fix(github): fix issue auto-labeling, te..." · Reviewed by Greptile

Comment thread .github/workflows/issue_moderator.yml Resolved
Comment thread .github/scripts/site-reachability.cjs Resolved
Comment thread .github/scripts/site-reachability.cjs Resolved
Comment thread .github/workflows/theme_auto_label.yml Resolved
@greptile-apps

greptile-apps Bot commented Nov 28, 2026

Copy link
Copy Markdown

Want your agent to iterate on Greptile's feedback? Try greploops.

Comment thread .github/scripts/site-reachability.cjs Resolved
Comment thread .github/scripts/site-reachability.cjs Resolved
Comment thread .github/workflows/issue_auto_label.yml Resolved
@7ui77
7ui77 force-pushed the fix/issue-templates-and-label-workflows branch from 3586478 to fd753b7 Compare December 4, 2026 22:50
@7ui77 7ui77 changed the title fix(github): fix issue templates, auto-labeling, and moderator workflows fix(github): fix issue auto-labeling, templates, and add scripts CI Dec 4, 2026
Comment thread .github/workflows/issue_auto_label.yml Resolved

This branch has not been deployed

No deployments
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.

1 participant