Skip to content

fix: stop the issue labeler stripping hand-added type:* labels - #7

Merged
TzuH-Hsu merged 1 commit into
mainfrom
fix/6-labeler-form-managed-types
Sep 15, 2026
Merged

TzuH-Hsu merged 1 commit into
mainfrom
fix/6-labeler-form-managed-types

Conversation

@TzuH-Hsu

Copy link
Copy Markdown
Owner

Summary

isFormManaged() 用 type: 前綴比對,導致手動加的 type:bug/type:feature 在下次編輯時被當成表單未選而移除。

  • isFormManaged() 對 type 家族改用精確清單 FORM_MANAGED_TYPES(= ALLOWED_SUBTYPES.map(s => \type:${s}`)),不再用 startsWith('type:')`
  • area: 前綴比對維持不變;ALLOWED_SUBTYPES 未變動

移植自 TzuH-Hsu/github-project-os@61b4cc3(#20)。

本 repo 在 bootstrap 時已具備 .github/labels.yml 的 type:bug/type:feature、對應的 GitHub label、以及 .github/PROJECT_FIELDS.md 的 Personal accounts 說明,這次不動它們。既有 issue 的 label 回填在本 PR merge 後另外處理。

Related issue

Closes #6

Validation

Pick validation depth by blast radius. A level that applies but could not run becomes a RISK: line below. See AGENTS.md for the validation ladder.

  • L0 static — make lint
  • L1 unit — make test
  • L2 integration — (if applicable)
  • L3 e2e / preview — (if applicable)

Risk / rollback

RISK: L3 not run — merge 後用真實 issue 驗證 labeler 不剝 label
Rollback: revert this commit; isFormManaged() reverts to prefix matching on type:

Checklist

Before merging:

  • Conventional Commit PR title (<type>: <description>)
  • Linked issue using "Closes #N"
  • No secrets, no *.local.md files committed
  • Documentation updated where affected

Port of TzuH-Hsu/github-project-os@61b4cc3 (#20). isFormManaged() now owns
the exact list of form-produced type:* subtypes instead of the type: prefix,
so the hand-applied coarse type:bug / type:feature labels survive edits.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-15T14:49:53.516528Z 06cd3a6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 06cd3a6a6c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// so on a bug report or feature request `desired` never holds a
// type:* label — and a prefix match would put every hand-applied
// type:* label into `toRemove` and strip it on the next body edit.
const FORM_MANAGED_TYPES = ALLOWED_SUBTYPES.map((s) => `type:${s}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move label ownership logic behind a make target

Adding FORM_MANAGED_TYPES here keeps the subtype-ownership decision embedded in executable workflow code, so adopters changing label behavior must modify the workflow and cannot exercise the same implementation through the repository's local make contract. Move the synchronization implementation into a repository script exposed by a Make target, leaving this workflow to invoke that target.

AGENTS.md reference: AGENTS.md:L17-L19

Useful? React with 👍 / 👎.

@TzuH-Hsu
TzuH-Hsu merged commit d070b75 into main Sep 15, 2026
1 check passed
@TzuH-Hsu
TzuH-Hsu deleted the fix/6-labeler-form-managed-types branch September 15, 2026 14:52
@github-actions github-actions Bot mentioned this pull request Sep 15, 2026
TzuH-Hsu pushed a commit that referenced this pull request Sep 15, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.1.1](v0.1.0...v0.1.1)
(2026-09-15)


### Bug Fixes

* align the area allowlist and issue-form options with labels.yml
([#10](#10))
([f0252e7](f0252e7))
* stop the issue labeler stripping hand-added type:* labels
([#7](#7))
([d070b75](d070b75))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Issue labeler 會在 issue 編輯時剝掉手動加的 type:bug/type:feature

1 participant