mattermost / mattermost/mattermost-plugin-gitlab

Subscriptions accept labels that don’t exist in the project

Open
#603 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
152
Forks
97
Avg merge
1d 14h
Merged PRs (30d)
8

Description

When adding a GitLab subscription with a label feature, the plugin does not check if the label actually exists in the project. The subscription is still created even when the label is invalid.

Steps to Reproduce:-

Set up GitLab with Mattermost.
Run /gitlab subscriptions add owner[/repo] issues,merges,label:"label1" (where label1 does not exist in the project)
The subscription is created without error.

Expected behavior
The plugin should validate that the label exists in the project. If the label does not exist, the subscription should not be created, and an error message should be returned.

Observed behavior
The subscription is created successfully even though the label does not exist in the project.

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 by tracing the /gitlab subscriptions add command and the handling of the label feature. Reproduce the case with a nonexistent label, then verify that invalid labels prevent subscription creation and return an error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.