From 6cbce952a1dfc955cf3e4b60b2d1620e2d89bb6e Mon Sep 17 00:00:00 2001 From: Cody Miller Date: Wed, 5 Oct 2022 16:11:30 -0400 Subject: [PATCH 1/2] devex: update build tyep --- src/rest/types/ignite.ts | 91 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 83 insertions(+), 8 deletions(-) diff --git a/src/rest/types/ignite.ts b/src/rest/types/ignite.ts index ce53620e..c21655cf 100644 --- a/src/rest/types/ignite.ts +++ b/src/rest/types/ignite.ts @@ -210,19 +210,86 @@ export interface Deployment { /** * Current active build for deployment */ - active_build: DeploymentBuild | null; + active_build: Build | null; } -export type DeploymentBuild = { +export interface BuildMetaData { + /** + * Account type of repo owner + */ + account_type?: 'user' | 'organization'; + + /** + * Author information about build + */ + author?: { + /** + * Author's Pfp + */ + avatar_url: string; + + /** + * Author's username + */ + username: string; + }; + + /** + * Repo ID for build + */ + repo_id: number; + + /** + * Repo name for build + */ + repo_name: string; + + /** + * Repo branch for build + */ + branch: string; + + /** + * commit SHA for build + */ + commit_sha: string; + + /** + * commit message for build + */ + commit_msg: string; + + /** + * commit URL for build + */ + commit_url?: string; +} + +export interface Build { + /** + * ID of the build + */ + id: Id<'build'>; + /** * Deployment ID for build */ deployment_id: Id<'deployment'>; /** - * Digest for image + * Metadata pertaining to build (mostly for GitHub) */ - digest: string | null; + metadata: BuildMetaData | null; + + /** + * Build method (GitHub or CLI) + */ + method: BuildMethod; + + /** + * Timestamp of when the build has started + */ + started_at: Timestamp; /** * Timestamp of when the build has finished @@ -230,10 +297,10 @@ export type DeploymentBuild = { finished_at: Timestamp | null; /** - * ID of the build + * Digest for image */ - id: Id<'build'>; -}; + digest: string | null; +} export type DeploymentRollout = { /** @@ -264,7 +331,7 @@ export type DeploymentRollout = { /** * The build that triggered the rollout */ - build: DeploymentBuild | null; + build: Build | null; }; // This is a type not an interface so we can make a union @@ -433,6 +500,14 @@ export interface ContainerLog { level: 'info' | 'error'; } +/** + * Types of build methods supported by Hop + */ +export enum BuildMethod { + GITHUB = 'github', + CLI = 'cli', +} + /** * Types of gateways supported by Hop */ From 0295c807dcaa1e4ff9afba9ae01f20c21cbf4a9b Mon Sep 17 00:00:00 2001 From: Cody Miller Date: Wed, 5 Oct 2022 16:12:43 -0400 Subject: [PATCH 2/2] docs(changeset): update build type --- .changeset/few-geese-jump.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/few-geese-jump.md diff --git a/.changeset/few-geese-jump.md b/.changeset/few-geese-jump.md new file mode 100644 index 00000000..94e7363f --- /dev/null +++ b/.changeset/few-geese-jump.md @@ -0,0 +1,5 @@ +--- +'@onehop/js': patch +--- + +update build type