Skip to content

Commit 5a3f9b2

Browse files
author
Joan Reyero
authored
Improvement/git GitHub activities (#947)
1 parent a53e023 commit 5a3f9b2

3 files changed

Lines changed: 124 additions & 4 deletions

File tree

backend/src/serverless/integrations/services/integrations/githubIntegrationService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ export class GithubIntegrationService extends IntegrationServiceBase {
13201320
out.push({
13211321
tenant: context.integration.tenantId,
13221322
username: author.user.login,
1323-
platform: PlatformType.GIT,
1323+
platform: PlatformType.GITHUB,
13241324
channel: repo.name,
13251325
url: `https://github.com/${repo.owner}/${repo.name}.git`,
13261326
body: record.commit.message,

frontend/src/integrations/git/components/git-connect-drawer.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
<template #after>
2929
<el-button
3030
class="btn btn--md btn--transparent w-10 h-10"
31-
:disabled="form.remotes.length === 1"
3231
@click="removeRemote(ii)"
3332
>
3433
<i class="ri-delete-bin-line text-lg" />
@@ -58,19 +57,19 @@
5857
:loading="loading"
5958
@click="connect"
6059
>
61-
{{ integration.settings?.remotes?.length ? "Update" : "Connect" }}
60+
{{ integration.settings?.remotes?.length ? 'Update' : 'Connect' }}
6261
</el-button>
6362
</div>
6463
</template>
6564
</app-drawer>
6665
</template>
6766

6867
<script setup>
69-
import { CrowdIntegrations } from '@/integrations/integrations-config';
7068
import useVuelidate from '@vuelidate/core';
7169
import {
7270
computed, onMounted, reactive, ref,
7371
} from 'vue';
72+
import { CrowdIntegrations } from '@/integrations/integrations-config';
7473
import AppArrayInput from '@/shared/form/array-input.vue';
7574
import formChangeDetector from '@/shared/form/form-change';
7675
import { mapActions } from '@/shared/vuex/vuex.helpers';

services/libs/integrations/src/integrations/activityTypes.ts

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,127 @@ export const DEFAULT_ACTIVITY_TYPE_SETTINGS: DefaultActivityTypes = {
266266
isContribution:
267267
GITHUB_GRID[GithubActivityType.PULL_REQUEST_REVIEW_THREAD_COMMENT].isContribution,
268268
},
269+
[GitActivityType.AUTHORED_COMMIT]: {
270+
display: {
271+
default: 'authored a commit in {channel}',
272+
short: 'authored a commit',
273+
channel: '{channel}',
274+
formatter: {
275+
channel: defaultGithubChannelFormatter,
276+
},
277+
},
278+
isContribution: true,
279+
},
280+
[GitActivityType.REVIEWED_COMMIT]: {
281+
display: {
282+
default: 'reviewed a commit in {channel}',
283+
short: 'reviewed a commit',
284+
channel: '{channel}',
285+
formatter: {
286+
channel: defaultGithubChannelFormatter,
287+
},
288+
},
289+
isContribution: true,
290+
},
291+
[GitActivityType.TESTED_COMMIT]: {
292+
display: {
293+
default: 'tested a commit in {channel}',
294+
short: 'tested a commit',
295+
channel: '{channel}',
296+
formatter: {
297+
channel: defaultGithubChannelFormatter,
298+
},
299+
},
300+
isContribution: true,
301+
},
302+
[GitActivityType.CO_AUTHORED_COMMIT]: {
303+
display: {
304+
default: 'co-authored a commit in {channel}',
305+
short: 'co-authored a commit',
306+
channel: '{channel}',
307+
formatter: {
308+
channel: defaultGithubChannelFormatter,
309+
},
310+
},
311+
isContribution: true,
312+
},
313+
[GitActivityType.INFORMED_COMMIT]: {
314+
display: {
315+
default: 'informed a commit in {channel}',
316+
short: 'informed a commit',
317+
channel: '{channel}',
318+
formatter: {
319+
channel: defaultGithubChannelFormatter,
320+
},
321+
},
322+
isContribution: true,
323+
},
324+
[GitActivityType.INFLUENCED_COMMIT]: {
325+
display: {
326+
default: 'influenced a commit in {channel}',
327+
short: 'influenced a commit',
328+
channel: '{channel}',
329+
formatter: {
330+
channel: defaultGithubChannelFormatter,
331+
},
332+
},
333+
isContribution: true,
334+
},
335+
[GitActivityType.APPROVED_COMMIT]: {
336+
display: {
337+
default: 'approved a commit in {channel}',
338+
short: 'approved a commit',
339+
channel: '{channel}',
340+
formatter: {
341+
channel: defaultGithubChannelFormatter,
342+
},
343+
},
344+
isContribution: true,
345+
},
346+
[GitActivityType.COMMITTED_COMMIT]: {
347+
display: {
348+
default: 'committed a commit in {channel}',
349+
short: 'committed a commit',
350+
channel: '{channel}',
351+
formatter: {
352+
channel: defaultGithubChannelFormatter,
353+
},
354+
},
355+
isContribution: true,
356+
},
357+
[GitActivityType.REPORTED_COMMIT]: {
358+
display: {
359+
default: 'reported a commit in {channel}',
360+
short: 'reported a commit',
361+
channel: '{channel}',
362+
formatter: {
363+
channel: defaultGithubChannelFormatter,
364+
},
365+
},
366+
isContribution: true,
367+
},
368+
[GitActivityType.RESOLVED_COMMIT]: {
369+
display: {
370+
default: 'resolved a commit in {channel}',
371+
short: 'resolved a commit',
372+
channel: '{channel}',
373+
formatter: {
374+
channel: defaultGithubChannelFormatter,
375+
},
376+
},
377+
isContribution: true,
378+
},
379+
[GitActivityType.SIGNED_OFF_COMMIT]: {
380+
display: {
381+
default: 'signed off a commit in {channel}',
382+
short: 'signed off a commit',
383+
channel: '{channel}',
384+
formatter: {
385+
channel: defaultGithubChannelFormatter,
386+
},
387+
},
388+
isContribution: true,
389+
},
269390
},
270391
[PlatformType.GIT]: {
271392
[GitActivityType.AUTHORED_COMMIT]: {

0 commit comments

Comments
 (0)