( authToken: string, org: string, projectName: string, url: string, type: string )
| 115 | } |
| 116 | |
| 117 | export async function projectsInfo( |
| 118 | authToken: string, |
| 119 | org: string, |
| 120 | projectName: string, |
| 121 | url: string, |
| 122 | type: string |
| 123 | ): Promise<ProjectDataType | undefined> { |
| 124 | const key = `${org}/${projectName.toLowerCase()}`; |
| 125 | try { |
| 126 | const res = await getAxiosInstance(url, authToken).get<ProjectDataType[]>( |
| 127 | `v3/subqueries/${buildProjectKey(org, projectName)}/deployments` |
| 128 | ); |
| 129 | |
| 130 | return res.data.find((element) => element.projectKey === `${key}` && element.type === type); |
| 131 | } catch (e) { |
| 132 | throw errorHandle(e, 'Failed to get projects:'); |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | export async function updateDeployment( |
| 137 | org: string, |
no test coverage detected