Skip to content

[feat]: add the ability to filter by group when fetching merge requests paginated #23

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

aakashnshah
Copy link

Change description

We want the ability to add a group ID filter to the paginated merge request API that fetches merge requests using page number and page size.

Type of change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)

Checklists

Development

  • Lint rules pass locally
  • Application changes have been tested thoroughly
  • Automated tests covering modified code pass

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Code review

  • Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
  • "Ready for review" label attached and reviewers assigned
  • Changes have been reviewed by at least one other contributor
  • Pull request linked to task tracker where applicable

@@ -71,6 +71,8 @@ public List<MergeRequest> getMergeRequests(MergeRequestFilter filter, int page,
}

response = get(Response.Status.OK, queryParams, "projects", filter.getProjectId(), "merge_requests");
} else if (filter != null && filter.getGroupId() != null && filter.getGroupId().intValue() > 0) {

Choose a reason for hiding this comment

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

I'm confused, is there a reason this list merge requests endpoint with page number and page size doesn't support the group id but the one with pager does support the group id path?

Is there a way to test that this works since we're branching the API code?

@aakashnshah aakashnshah merged commit 8b2a714 into master Aug 15, 2024
2 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants