diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-12-07 12:06:14 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-12-07 12:06:14 +0300 |
commit | 7c4e996c74394708f8f7ebe3b4c90da936c014c8 (patch) | |
tree | 1538cb423d684fa7a200f41e6ae97eb2adb68880 /app/assets/javascripts/diffs/store | |
parent | a2e06ad3034cd1e007b78514a5c1f47feef7b648 (diff) | |
parent | e7439c310471d024df04796c227988a152c4c072 (diff) |
Merge branch 'winh-merge-request-diff-discussion-commit-id' into 'master'
Pass commit when posting diff discussions
See merge request gitlab-org/gitlab-ce!23371
Diffstat (limited to 'app/assets/javascripts/diffs/store')
-rw-r--r-- | app/assets/javascripts/diffs/store/actions.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/diffs/store/utils.js | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/diffs/store/actions.js b/app/assets/javascripts/diffs/store/actions.js index c0456c18e44..952963e0711 100644 --- a/app/assets/javascripts/diffs/store/actions.js +++ b/app/assets/javascripts/diffs/store/actions.js @@ -192,8 +192,9 @@ export const toggleFileDiscussions = ({ getters, dispatch }, diff) => { }); }; -export const saveDiffDiscussion = ({ dispatch }, { note, formData }) => { +export const saveDiffDiscussion = ({ state, dispatch }, { note, formData }) => { const postData = getNoteFormData({ + commit: state.commit, note, ...formData, }); diff --git a/app/assets/javascripts/diffs/store/utils.js b/app/assets/javascripts/diffs/store/utils.js index 5c6b20109bb..cbaa0e26395 100644 --- a/app/assets/javascripts/diffs/store/utils.js +++ b/app/assets/javascripts/diffs/store/utils.js @@ -27,6 +27,7 @@ export const getReversePosition = linePosition => { export function getFormData(params) { const { + commit, note, noteableType, noteableData, @@ -66,7 +67,7 @@ export function getFormData(params) { position, noteable_type: noteableType, noteable_id: noteableData.id, - commit_id: '', + commit_id: commit && commit.id, type: diffFile.diff_refs.start_sha && diffFile.diff_refs.head_sha ? DIFF_NOTE_TYPE |