summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_merge_request_widget/mixins/ready_to_merge.js
blob: 116d537c46384c8694c4a1f57cf4d0ec0d151101 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { __ } from '~/locale';

export default {
  computed: {
    isMergeButtonDisabled() {
      const { commitMessage } = this;
      return Boolean(
        !commitMessage.length ||
          !this.shouldShowMergeControls ||
          this.isMakingRequest ||
          this.mr.preventMerge,
      );
    },
    autoMergeText() {
      // MWPS is currently the only auto merge strategy available in CE
      return __('Merge when pipeline succeeds');
    },
  },
};