debian-mirror-gitlab/app/assets/javascripts/issues/related_merge_requests/index.js

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

24 lines
599 B
JavaScript
Raw Normal View History

2019-07-07 11:18:12 +05:30
import Vue from 'vue';
import RelatedMergeRequests from './components/related_merge_requests.vue';
import createStore from './store';
2022-03-02 08:16:31 +05:30
export function initRelatedMergeRequests() {
const el = document.querySelector('#js-related-merge-requests');
2019-07-07 11:18:12 +05:30
2022-03-02 08:16:31 +05:30
if (!el) {
return undefined;
2019-07-07 11:18:12 +05:30
}
2022-03-02 08:16:31 +05:30
const { endpoint, projectPath, projectNamespace } = el.dataset;
return new Vue({
el,
2022-04-04 11:22:00 +05:30
name: 'RelatedMergeRequestsRoot',
2022-03-02 08:16:31 +05:30
store: createStore(),
render: (createElement) =>
createElement(RelatedMergeRequests, {
props: { endpoint, projectNamespace, projectPath },
}),
});
2019-07-07 11:18:12 +05:30
}