circle-ci integration on progress

This commit is contained in:
Aashish-Upadhyay-101
2023-02-07 13:20:39 +05:45
parent b0ffac2f00
commit 80d219c3e0
11 changed files with 379 additions and 335 deletions
+5 -2
View File
@@ -321,9 +321,10 @@ const getAppsCircleci = async ({ accessToken }: { accessToken: string }) => {
await axios.get(`${INTEGRATION_CIRCLECI_API_URL}/v2/me/collaborations`, {
headers: {
"Circle-Token": accessToken,
"Accept-Encoding": "application/json",
},
})
).data;
).data[0];
const { slug } = circleciOrganizationDetail;
@@ -333,15 +334,17 @@ const getAppsCircleci = async ({ accessToken }: { accessToken: string }) => {
{
headers: {
"Circle-Token": accessToken,
"Accept-Encoding": "application/json",
},
}
)
).data.items;
).data?.items;
apps = res.map((a: any) => ({
name: a?.project_slug?.split("/")[2],
}));
} catch (err) {
console.log(err);
Sentry.setUser(null);
Sentry.captureException(err);
throw new Error("Failed to get Render services");