Skip to content

Commit

Permalink
Updating code quaility
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalrymple committed Jan 22, 2024
1 parent 946a717 commit 6f1d31c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 39 deletions.
5 changes: 5 additions & 0 deletions .autorc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ labels:
description: Changes upgrade or remove dependencies
releaseType: patch

- name: type:types
changelogTitle: 🗃️ Typescript Definitions
description: Changes only affect typescript definitions
releaseType: patch

- name: type:testing
changelogTitle: 🚨 Tests
description: Changes affect test code
Expand Down
65 changes: 26 additions & 39 deletions packages/core/src/resources/Webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,27 @@ export interface WebhookProjectSchema {
http_url: string;
}

export interface WebhookPipelineSchema {
project: {
id: number;
web_url: string;
path_with_namespace: string;
};
pipeline_id: number;
job_id: number;
}

export interface WebhookDiffSchema {
diff: string;
new_path: string;
old_path: string;
a_mode: string;
b_mode: string;
new_file: boolean;
renamed_file: boolean;
deleted_file: boolean;
}

export interface BaseWebhookEventSchema {
object_kind: string;
event_name: string;
Expand Down Expand Up @@ -72,16 +93,7 @@ export interface WebhookBaseNoteEventSchema extends BaseWebhookEventSchema {
commit_id: string;
noteable_id: string | null;
system: boolean;
st_diff: {
diff: string;
new_path: string;
old_path: string;
a_mode: string;
b_mode: string;
new_file: boolean;
renamed_file: boolean;
deleted_file: boolean;
};
st_diff: WebhookDiffSchema | null;
url: string;
};
}
Expand Down Expand Up @@ -171,7 +183,7 @@ export interface WebhookIssueEventSchema extends BaseWebhookEventSchema {
id: number;
name: string;
};
labels: WebhookEventLabelSchema[] | null;
labels: WebhookLabelSchema[] | null;
};
repository: {
name: string;
Expand Down Expand Up @@ -438,15 +450,7 @@ export interface WebhookPipelineEventSchema
email: string;
};
};
source_pipeline: {
project: {
id: number;
web_url: string;
path_with_namespace: string;
};
pipeline_id: number;
job_id: number;
};
source_pipeline: WebhookPipelineSchema;
builds:
| {
id: number;
Expand Down Expand Up @@ -531,15 +535,7 @@ export interface WebhookJobEventSchema extends MappedOmit<BaseWebhookEventSchema
action: string;
deployment_tier: string;
} | null;
source_pipeline: {
project: {
id: number;
web_url: string;
path_with_namespace: string;
};
pipeline_id: number;
job_id: number;
};
source_pipeline: WebhookPipelineSchema;
}

export interface WebhookDeploymentEventSchema
Expand Down Expand Up @@ -676,16 +672,7 @@ export interface WebhookEmojiEventSchema extends BaseWebhookEventSchema {
resolved_at: string | null;
resolved_by_id: number | null;
resolved_by_push: boolean | null;
st_diff: {
diff: string;
new_path: string;
old_path: string;
a_mode: string;
b_mode: string;
new_file: boolean;
renamed_file: boolean;
deleted_file: boolean;
} | null;
st_diff: WebhookDiffSchema | null;
system: boolean;
type: string | null;
updated_at: string;
Expand Down

0 comments on commit 6f1d31c

Please sign in to comment.