Skip to content

fix: label discussions with preceding form fields - #1146

Merged
ReenigneArcher merged 2 commits into
masterfrom
codex/fix-discussion-topic-labels
Nov 12, 2026
Merged

ReenigneArcher merged 2 commits into
masterfrom
codex/fix-discussion-topic-labels

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

The topic-labeling workflow only inspected the first h3 in a discussion. Themerr, Actions, and Libraries forms put product fields before Select Topic Area, so their discussions silently skipped labeling. In discussion #1145, the selected Feature Request was ignored because the first heading was Select Themerr Product.

Find the topic heading by its text anywhere in the form, keep the existing supported-topic allowlist, and let unexpected parser errors fail the workflow. Extract the parser into a tested helper and run its regression suite in CI. Add a manual discussion_number input so existing missed discussions can be labeled after merging.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

  • npm test: all 23 tests passed, covering every supported topic across all current form layouts, HTML entities, whitespace, and missing or invalid fields. The ten Actions/Libraries and Themerr cases failed against the original first-heading lookup and passed with the fix.
  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 .github/workflows/label-templated-discussions.yml .github/workflows/tests.yml: passed.
  • yamllint on both workflows with the repository's applicable line-length and truthy settings: passed.
  • git diff --cached --check: passed.
  • Live label mutation was not tested. The connector does not support discussion labels, CLI GraphQL access was unavailable, and browser access was blocked by URL-policy enforcement. Discussion Check region availability beyond the US for theme videos #1145 can be repaired with the new manual trigger once merged. Hosted CI is pending.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher
ReenigneArcher merged commit cc06346 into master Nov 12, 2026
9 checks passed
@ReenigneArcher
ReenigneArcher deleted the codex/fix-discussion-topic-labels branch November 12, 2026 21:21
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