Merge Request Discussions API: accept commit_id to create discussion on commit
What does this MR do?
When creating a new thread on a merge request by using the MR Discussions API, the thread is always on the merge request's entire diff.
This patch allows passing the commit_id
parameter to associate the thread with the desired commit.
Here is a screenshot of the results. Both comments were created using the API.
The second comment was created after my changes, and thus contains the desired started a thread on commit 555c8706
.
Before
After
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Merge request reports
Activity
added 1st contribution Community contribution labels
mentioned in issue gitlab-org/quality/triage-reports#779 (closed)
mentioned in issue gitlab-org/quality/triage-reports#830 (closed)
Please see a demonstration of the problem at https://gitlab.debian.net/krobelus/demo-project/-/merge_requests/1
added api devopscreate featureaddition groupcode review merge requests typefeature labels
- Resolved by Patrick Bajao
I still haven't figured out how set up the RSpec unit tests - I guess I need to follow most steps of the Installation from source, I presume that will allow me to run something like
bundle exec rspec spec spec/requests/api/discussions_spec.rb
.
added sectiondev label
- Resolved by Johannes Altmanninger
added 2957 commits
-
f547c0ae...44b5330e - 2956 commits from branch
gitlab-org:master
- 53c824ec - Merge Request Discussions API: accept commit_id to create discussions on commit
-
f547c0ae...44b5330e - 2956 commits from branch
marked the checklist item Changelog entry as completed
added 1 commit
- e168f727 - Merge Request Discussions API: accept commit_id to create discussions on commit
- Resolved by Johannes Altmanninger
- Resolved by Johannes Altmanninger
- Resolved by Johannes Altmanninger
assigned to @krobelus
added 1 commit
- 43b64af7 - Merge Request Discussions API: accept commit_id to create discussions on commit
added 1 commit
- ec7aa715 - Merge Request Discussions API: accept commit_id to create discussions on commit
added 1 commit
- 25ba9589 - Merge Request Discussions API: accept commit_id to create discussions on commit
added 1 commit
- a8aabba5 - Merge Request Discussions API: accept commit_id to create discussions on commit
added 2606 commits
-
a8aabba5...58bc9bea - 2605 commits from branch
gitlab-org:master
- 770cb3ab - Merge Request Discussions API: accept commit_id to create discussions on commit
-
a8aabba5...58bc9bea - 2605 commits from branch
- Resolved by Johannes Altmanninger
- Resolved by Marcia Ramos
Hi @kerrizor, can you please review this as backend maintainer?
Hi @marcia, can you please review the documentation changes?
Thanks all!
added 1 commit
- 8b6b7796 - Merge Request Discussions API: accept commit_id to create discussions on commit
unassigned @kerrizor
marked the checklist item Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. as completed
- Resolved by Johannes Altmanninger
added Technical Writing documentation twfinished labels
added docsfeature label
unassigned @marcia
added 1 commit
- b7f2365f - Merge Request Discussions API: accept commit_id to create discussions on commit
- Resolved by Kerri Miller
Hate to be that guy but I noticed there are two days to go in the 13.7 milestone - let me know if there is anything left to do for me before this is merged.
Edited by Johannes Altmanninger
added backend label
2 Errors b7f2365f: The commit subject may not be longer than 72 characters. For more information, take a look at our Commit message guidelines. b7f2365f: The commit body should not contain more than 72 characters per line. For more information, take a look at our Commit message guidelines. 1 Warning This merge request does not refer to an existing milestone. 1 Message This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge. Documentation review
The following files require a review from a technical writer:
doc/api/discussions.md
The review does not need to block merging this merge request. See the:
- Technical Writers assignments for the appropriate technical writer for this review.
- Documentation workflows for information on when to assign a merge request for review.
Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited, or the chosen person is unavailable.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not automatically notify them for you.
Category Reviewer Maintainer backend Michał Zając ( @quintasan
) (UTC+1)Imre Farkas ( @ifarkas
) (UTC+1)If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by 🤖 GitLab Bot 🤖enabled an automatic merge when the pipeline for b783fac1 succeeds