Download wp-calypso/client/sites/deployments/routes.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 882 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/deployments/routes.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/sites/deployments/routes.ts
-
curl -L -o routes.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/sites/deployments/routes.ts
882 Bytes
| import { addQueryArgs } from 'calypso/lib/url'; | |
| interface CreateDeploymentRouteParams { | |
| installationId?: number; | |
| repositoryId?: number; | |
| } | |
| export const indexPage = ( siteSlug: string ) => `/github-deployments/${ siteSlug }`; | |
| export const createPage = ( siteSlug: string ) => `${ indexPage( siteSlug ) }/create`; | |
| export const createDeploymentPage = ( | |
| siteSlug: string, | |
| { installationId, repositoryId }: CreateDeploymentRouteParams = {} | |
| ) => { | |
| return addQueryArgs( | |
| { installation_id: installationId, repository_id: repositoryId }, | |
| `${ indexPage( siteSlug ) }/create` | |
| ); | |
| }; | |
| export const manageDeploymentPage = ( siteSlug: string, deploymentId: number ) => { | |
| return `${ indexPage( siteSlug ) }/manage/${ deploymentId }`; | |
| }; | |
| export const viewDeploymentLogs = ( siteSlug: string, deploymentId: number ) => { | |
| return `${ indexPage( siteSlug ) }/logs/${ deploymentId }`; | |
| }; | |