Add /related_issues endpoint to Merge Requests API
requested to merge gitlab-community/gitlab:461536-add-related-issues-to-merge-requests-api into master
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
What does this MR do and why?
This MR adds new API endpoint which allows users to get info about all issues related to merge request. Related issues are collected from merge request's:
- title
- description
- commit messages
- notes
How to set up and validate locally
- Create merge request in any project which:
- mentions
issue #1
in title - mentions
issue #2
in description - mentions
issue #3
in commit message
- Start discussion in newly created merge request which references
issue #4
- Create issue as a follow up from disccussion started in step 2
- Mention merge request created in step 1 in any issue
- Send request to access new API endpoint:
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://127.0.0.1:3000/api/v4/projects/7/merge_requests/1/related_issues"
- Check that JSON response has information about issues
#1, #2, #3, #4
and issues created in step 3 and 4
Related to #461536 (closed)
Edited by Zakir Dzhamaliddinov