chore: Stop emitting pr/issue-ref-missing and pr/title-not-capitalised labels#6
Open
johnxie wants to merge 1 commit into
Open
chore: Stop emitting pr/issue-ref-missing and pr/title-not-capitalised labels#6johnxie wants to merge 1 commit into
johnxie wants to merge 1 commit into
Conversation
…d labels These two title labels are advisory-only noise (zero downstream automation in taskcade — verified). Convert both rules to always push to labelsToRemove so the labels are never added again and existing PRs self-clean on the next PR event. The other three title checks (type-missing, ending-period, feat-fix-no-scope) are unchanged. lib/index.js is hand-patched to mirror the source change because the pinned @vercel/ncc 0.28.6 toolchain no longer bundles in current envs (node: scheme + OpenSSL3); the change is a literal unconditional push, verified by grep + node --check.
There was a problem hiding this comment.
Pull request overview
This PR disables two advisory PR-title labeling rules by ensuring the action only removes (and never adds) the labels pr/issue-ref-missing and pr/title-not-capitalised, including in the committed lib/index.js artifact.
Changes:
- Disable “missing issue reference” labeling by always pushing
ISSUE_REFERENCE_MISSINGtolabelsToRemove. - Disable “title not capitalised” labeling by pushing
TITLE_NOT_CAPITALISEDtolabelsToRemove(currently only whenparsed.subject != null). - Apply the same behavior to the compiled
lib/index.jsartifact.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/verifyPRTitle.ts | Disables two title-labeling checks by removing the “add label” paths. |
| lib/index.js | Mirrors the source change in the shipped action artifact. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
38
to
+41
| // Subject | ||
| if (parsed.subject != null) { | ||
| // Capitalisation | ||
| const firstChar = parsed.subject.slice(0, 1); | ||
|
|
||
| if (firstChar !== firstChar.toUpperCase()) { | ||
| result.labelsToAdd.push(TitleLabel.TITLE_NOT_CAPITALISED); | ||
| } else { | ||
| result.labelsToRemove.push(TitleLabel.TITLE_NOT_CAPITALISED); | ||
| } | ||
| // Capitalisation — check disabled; always clear the label so existing PRs self-clean | ||
| result.labelsToRemove.push(TitleLabel.TITLE_NOT_CAPITALISED); |
Comment on lines
309
to
+312
| // Subject | ||
| if (parsed.subject != null) { | ||
| // Capitalisation | ||
| const firstChar = parsed.subject.slice(0, 1); | ||
| if (firstChar !== firstChar.toUpperCase()) { | ||
| result.labelsToAdd.push(TitleLabel.TITLE_NOT_CAPITALISED); | ||
| } | ||
| else { | ||
| result.labelsToRemove.push(TitleLabel.TITLE_NOT_CAPITALISED); | ||
| } | ||
| // Capitalisation — check disabled; always clear the label so existing PRs self-clean | ||
| result.labelsToRemove.push(TitleLabel.TITLE_NOT_CAPITALISED); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Stops the PR Assistant from adding two advisory-only title labels:
pr/issue-ref-missing :hash:(#️⃣)pr/title-not-capitalised :a:(Both rules now always push to
labelsToRemove, so the labels are never added again and existing PRs self-clean on their nextpull_requestevent. The other three title checks (type-missing,title-has-ending-period,feat-fix-no-scope) are unchanged.Why
Verified across all of
taskade/taskcade's.github/workflows: these two labels have zero downstream automation — they gate nothing, trigger no deploy/merge. Pure visual noise on the PR list.Notes on the build
lib/index.jsis the committed artifact the action actually runs, so it is updated in this PR. The pinned@vercel/ncc@0.28.6toolchain no longer bundles cleanly in current environments (node:import scheme + OpenSSL-3ERR_OSSL_EVP_UNSUPPORTED), solib/index.jswas hand-patched to mirror the source change exactly — the edit is a literal unconditionallabelsToRemove.push(...). Verified:grepshows 0 add-rules / 2 remove-rules for these labels, andnode --check lib/index.jspasses.Verification
src/verifyPRTitle.ts+lib/index.jsdiffs matchnode --check lib/index.jspasseslabelsToAddfor the two labels remain