Skip to content

fix: require 50 characters for issue commands - #458

Open
camilleislasse wants to merge 1 commit into
dev-null-sh:productionfrom
camilleislasse:fix/issue-body-min-length
Open

camilleislasse wants to merge 1 commit into
dev-null-sh:productionfrom
camilleislasse:fix/issue-body-min-length

Conversation

@camilleislasse

Copy link
Copy Markdown
Contributor

Closes #425

/bug and /feature drafts used the commit rules, so a three-character draft could open an issue upstream. They now need at least 50 characters.

  • Server: CreateIssueRequest validates the body with its own minimum (MIN_BODY_LENGTH = 50, still up to 4,000), measured after blank lines are collapsed, like commits.
  • Composer: "Open issue" and ⌘/Ctrl+Enter stay disabled below 50 characters, and the button's tooltip says "Write at least 50 characters". The draft is counted the same way the server counts it (normalizeBody), so padding it with blank lines doesn't enable the button.
  • KNOWLEDGE_BASE.md now says issue drafts accept 50–4,000 characters.

Tests

  • IssueControllerTest: 49 characters and a body padded with blank lines are rejected, 50 characters open the issue. Existing tests that sent very short bodies (Broken.) now send a full sentence.
  • ComposerDraft.test.tsx: ⌘/Ctrl+Enter doesn't open an issue for a short or padded draft. The existing submit case now uses a full sentence.

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.

To avoid misuse, the minimum character limit for bug reports / feature requests to be 50 and not 3.

1 participant