Skip to content

feat: Implement project release API endpoints#393

Open
chiragchadha1 wants to merge 4 commits intomainfrom
cc/project-release-api
Open

feat: Implement project release API endpoints#393
chiragchadha1 wants to merge 4 commits intomainfrom
cc/project-release-api

Conversation

@chiragchadha1
Copy link
Copy Markdown
Contributor

Description and Context

Related to DPGDXFE-1041

Adds API functions and types for the new project release endpoints on DFSBuildPipeline's ProjectResource. These are needed by the CLI's hs project release command family (DPGDXFE-1041, DPGDXFE-1042, DPGDXFE-1043).

Three new API functions:

  • createRelease(accountId, projectName, buildId)POST /projects/{name}/releases
  • listReleases(accountId, projectName, params?)GET /projects/{name}/releases
  • getReleaseInfo(accountId, projectName, releaseTag)GET /projects/{name}/releases/{tag}

Two new types in types/Project.ts:

  • Release — release object with tag, buildId, createdAt, and optional components
  • FetchListReleasesResponse — standard CollectionResponse with paging cursor

The release API is still being actively developed by the backend team and may change. This gets the foundation in place so the CLI can start building against it.

Screenshots

TODO

  • API shape may change as the backend iterates — types and functions will need updating

Who to Notify

@brandenrodgers @camden11 @joe-yeager

Comment thread types/Project.ts
buildId: number;
createdAt: string;
components?: Array<{
buildType: ValueOf<typeof SUBBUILD_TYPES>;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it's possible the SUBBUILD_TYPES const is outdated - see joe's comment here:
https://github.com/HubSpotEngineering/hubspot-cli-private/pull/588#discussion_r3033942007

Probably doesn't matter a ton, but if it's not urgent to merge this, we might want to figure out accurate typing before we move forward with this. I made an issue to audit our project types
https://linear.app/hubspot/issue/DPGDXFE-1218/audit-project-types-in-ppl-ldl-and-the-cli

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah this can definitely wait. I'll mark that issue as blocking this PR / issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants