Skip to content

Commit

Permalink
Merge pull request #34 from hopinc/build-type-update
Browse files Browse the repository at this point in the history
devex: update build type
  • Loading branch information
Looskie authored Oct 5, 2022
2 parents 476fa1d + 0295c80 commit 77eb712
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-geese-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@onehop/js': patch
---

update build type
91 changes: 83 additions & 8 deletions src/rest/types/ignite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,30 +210,97 @@ 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
*/
finished_at: Timestamp | null;

/**
* ID of the build
* Digest for image
*/
id: Id<'build'>;
};
digest: string | null;
}

export type DeploymentRollout = {
/**
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
*/
Expand Down

1 comment on commit 77eb712

@vercel
Copy link

@vercel vercel bot commented on 77eb712 Oct 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hop-js – ./

js.hop.io
hop-js-onehop.vercel.app
hop-js-git-master-onehop.vercel.app
hop-js.vercel.app

Please sign in to comment.