mattermost / mattermost/mattermost-plugin-github

Validate syntax when a subscription has an invalid label

Open
#385 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Difficulty/1:Easy Good First Issue Hacktoberfest Help Wanted Tech/Go Type/Enhancement Up For Grabs
Dominant language
Go
Stars
179
Forks
180
Avg merge
1d 16h
Merged PRs (30d)
13

Description

If a user mistakenly forgets the `"` on the label, the label has no affect and it's not obvious why.

Ideally we can prevent this by checking if `label:` is followed by a value in quotes to prevent user error. If we showed a message such as `no valid label provided` this would be far more forgiving.

Steps:
- type `/github subscribe DHaussermann/hello-world pulls,issues,creates,deletes,label:Apples` with `Apples` instead of `"Apples"`
- Subscription successful

**Observed** Label has no affect as no valid label was provided

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the subscription command parser and follow how the label argument is handled, then reproduce the command with label:Apples and with label:"Apples". Done means an unquoted label is rejected with a clear message such as "no valid label provided", while a quoted label remains accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.