debian-mirror-gitlab/app/assets/javascripts/mr_notes/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
838 B
JavaScript
Raw Normal View History

2021-03-11 19:13:27 +05:30
import initCherryPickCommitModal from '~/projects/commit/init_cherry_pick_commit_modal';
import initRevertCommitModal from '~/projects/commit/init_revert_commit_modal';
2023-03-04 22:38:38 +05:30
import { initMrStateLazyLoad } from '~/mr_notes/init';
2021-03-11 19:13:27 +05:30
import MergeRequest from '../merge_request';
2023-03-04 22:38:38 +05:30
import { resetServiceWorkersPublicPath } from '../lib/utils/webpack';
2018-03-27 19:54:05 +05:30
export default function initMrNotes() {
2019-03-02 22:35:43 +05:30
resetServiceWorkersPublicPath();
2018-11-08 19:23:39 +05:30
const mrShowNode = document.querySelector('.merge-request');
// eslint-disable-next-line no-new
new MergeRequest({
action: mrShowNode.dataset.mrAction,
});
2023-03-04 22:38:38 +05:30
initMrStateLazyLoad();
2018-03-27 19:54:05 +05:30
2021-03-11 19:13:27 +05:30
document.addEventListener('merged:UpdateActions', () => {
2021-12-11 22:18:48 +05:30
initRevertCommitModal('i_code_review_post_merge_submit_revert_modal');
initCherryPickCommitModal('i_code_review_post_merge_submit_cherry_pick_modal');
2021-03-11 19:13:27 +05:30
});
2018-03-27 19:54:05 +05:30
}