github.com/covergates/covergates@v0.2.2-0.20201009050117-42ef8a19fb95/web/src/components/ReportGuide.vue (about)

     1  <template>
     2    <div>
     3      <v-card flat>
     4        <v-card-title class="text-h6">Step 1. Get the binary</v-card-title>
     5        <v-divider />
     6        <v-card-text class="py-2">
     7          Download
     8          <a href="https://github.com/covergates/covergates/releases">covergates binary</a>
     9          for your platform. You will find
    10          <span class="font-weight-bold">covergates</span>
    11          (or
    12          <span class="font-weight-bold">covergates.exe</span> for Windows) in the package.
    13        </v-card-text>
    14      </v-card>
    15  
    16      <v-card flat>
    17        <v-card-title class="text-h6">Step 2. Update Setting</v-card-title>
    18        <v-divider />
    19        <v-card-text class="py-2">
    20          You can change covergates default behavior by update
    21          <router-link :to="{name: 'report-setting'}">setting</router-link>.
    22          Available options are:
    23          <ul>
    24            <li>
    25              Apply path
    26              <span class="font-weight-bold">filter</span>, which trims the file paths in coverage report.
    27            </li>
    28            <li>Activate Webhook</li>
    29          </ul>
    30        </v-card-text>
    31      </v-card>
    32  
    33      <v-card flat>
    34        <v-card-title class="text-h6">Step 3. Run Testing</v-card-title>
    35        <v-divider />
    36        <v-card-text class="py-2">Test your codes and collect coverage reports.</v-card-text>
    37      </v-card>
    38  
    39      <v-card flat>
    40        <v-card-title class="text-h6">Step 4. Commit Report</v-card-title>
    41        <v-divider />
    42        <v-card-text class="py-2">
    43          Almost there! Copy your report ID:
    44          <v-btn x-small class="mx-1" v-clipboard:copy="reportID">{{reportID}}</v-btn>
    45          <br />Run:
    46          <code class="mx-2">covergates upload --report "Report ID" --type "Report Type" "Report"</code>
    47        </v-card-text>
    48      </v-card>
    49    </div>
    50  </template>
    51  
    52  <script lang="ts">
    53  import { Component } from 'vue-property-decorator';
    54  import Vue from '@/vue';
    55  
    56  type StepGuide = {
    57    title: string;
    58    body: string;
    59  };
    60  
    61  @Component
    62  export default class ReportGuide extends Vue {
    63    get repo(): Repository | undefined {
    64      return this.$store.state.repository.current;
    65    }
    66  
    67    get reportID(): string {
    68      return this.repo && this.repo.ReportID ? this.repo.ReportID : '';
    69    }
    70  
    71    get reportURL(): string {
    72      const base = this.$store.state.base;
    73      if (!this.repo) {
    74        return '';
    75      }
    76      const { SCM: scm, Name: name, NameSpace: space } = this.repo;
    77      return `${base}/report/${scm}/${space}/${name}`;
    78    }
    79  }
    80  </script>