debian-mirror-gitlab/app/assets/javascripts/jira_connect/branches/index.js

32 lines
748 B
JavaScript
Raw Normal View History

2021-10-27 15:23:28 +05:30
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import JiraConnectNewBranchPage from '~/jira_connect/branches/pages/index.vue';
import createDefaultClient from '~/lib/graphql';
Vue.use(VueApollo);
export default async function initJiraConnectBranches() {
const el = document.querySelector('.js-jira-connect-create-branch');
if (!el) {
return null;
}
const { initialBranchName, successStateSvgPath } = el.dataset;
const apolloProvider = new VueApollo({
2021-12-11 22:18:48 +05:30
defaultClient: createDefaultClient(),
2021-10-27 15:23:28 +05:30
});
return new Vue({
el,
apolloProvider,
provide: {
initialBranchName,
successStateSvgPath,
},
render(createElement) {
return createElement(JiraConnectNewBranchPage);
},
});
}