summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/cycle_analytics/components/item_merge_request_component.js.es6
blob: 0fd0767a3d0c2fe39a58cbd841ccc124acb9fac9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
((global) => {
  global.cycleAnalytics = global.cycleAnalytics || {};

  /*
  `mergeRequest` prop should have

  - MR title
  - MR URL
  - MR ID
  - MR date opened
  - MR author
  - MR author profile URL
  - MR author avatar URL
  - Total time
  */

  global.cycleAnalytics.ItemMergeRequestComponent = Vue.extend({
    props: {
      mergeRequest: Object,
    },
    template: `
      <div>
        <p>
          <h5>
            <a href="mergeRequest.url">
              {{ mergeRequest.title }}
            </a>
          </h5>
        </p>
      </div>
    `,
  });
}(window.gl || (window.gl = {})));