-
Notifications
You must be signed in to change notification settings - Fork 669
feat: introduce related_issues to merge requests #2996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ensure black lint check passes following PEP-8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your contribution @xakepnz!
I just left a few initial comments to get tests green hopefully. Let me know if anything's unclear.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2996 +/- ##
=======================================
Coverage 96.61% 96.61%
=======================================
Files 95 95
Lines 6080 6087 +7
=======================================
+ Hits 5874 5881 +7
Misses 206 206
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Hey @nejch, thanks for the quick replies! - I ended up reverting my test before seeing your suggestions. So i've re-added it and i'm still working on Mocking the calls to You're correct, the response from GitLab API is a list of dicts containing a lot more than just the issue id's. I'll keep working on this to try and pass CI tests. |
Add related_issues mock endpoint call and resp test
Update title attr and ensure GET request is mocked
Ensure related_issues URL calls match expected mocks
Ensure related_issues mock request matches the same project & MR mock request
RESTObjectList iters an expected ProjectIssue obj
Hey @nejch should be all set now thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for your contribution @xakepnz, LGTM now!
These days I'd probably prefer a manager with .list()
which would also solve your next(iter(..))
issues, but it's a bit of overhead in the code and I see we already have the same approach for commits
, closes_issues
etc.
I'll squash the commits just so we have a clean history here.
Changes
related_issues
for themerge_requests
object, returning a list of all related issues.Context
GitLab released
related_issues
(official docs), an endpoint which collects all issues that relate to the current MR. This can be from:See the change introduced: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/155422
PoC:
Documentation and testing
Both docs & tests updated
Please consider whether this PR needs documentation and tests. This is not required, but highly appreciated: