Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

feat(commands/api): add a reviewer filter to the mr list command #681

Merged
merged 1 commit into from
Apr 16, 2021

Conversation

huegelcesar
Copy link
Contributor

Description
Currently, it's not possible to filter the merge requests list by its reviewers.
So, this MR adds a new optional parameter (--reviewer) to the mr list command to enable filtering merge requests by its reviewers.

Note: this implementation uses the same flow of assignee filtering and applies an OR operation between Assignee and Reviewer, so it does not break any previous behavior.

Related Issue
Delivers #680

How Has This Been Tested?
Locally tried to list merge requests for different combinations of parameters, on a self-hosted instance and everything worked. Some tested cases:

  • mr list --reviewer=@me
  • mr list --reviewer=@me,OtherUserName
  • mr list --reviewer=@me --assignee=OtherUserName

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)

@codecov
Copy link

codecov bot commented Apr 10, 2021

Codecov Report

Merging #681 (04945a6) into trunk (88b415b) will decrease coverage by 0.02%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            trunk     #681      +/-   ##
==========================================
- Coverage   59.98%   59.95%   -0.03%     
==========================================
  Files          90       90              
  Lines        6442     6450       +8     
==========================================
+ Hits         3864     3867       +3     
- Misses       2214     2218       +4     
- Partials      364      365       +1     
Impacted Files Coverage Δ
commands/mr/list/mr_list.go 62.22% <50.00%> (-1.56%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88b415b...04945a6. Read the comment docs.

Copy link
Owner

@profclems profclems left a comment

Choose a reason for hiding this comment

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

Thanks @huegelcesar for working on this!
I will review this later in the day

@profclems profclems requested a review from zemzale April 10, 2021 17:31
Copy link
Collaborator

@zemzale zemzale left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work @huegelcesar

@profclems profclems merged commit 79e9476 into profclems:trunk Apr 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants