From 1db34af14eb9c0a8404cd4ac94311473a95d53d4 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sun, 19 Jun 2022 15:44:07 -0500 Subject: [PATCH] this is not a beauty contest --- src/util/Jenkins.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/Jenkins.ts b/src/util/Jenkins.ts index ad3f9320..f42cfd3b 100644 --- a/src/util/Jenkins.ts +++ b/src/util/Jenkins.ts @@ -8,7 +8,7 @@ export type Job = { url: string } -export type Build = { +export type Build = { number: number, url: string, changes?: BuildChange[], @@ -22,7 +22,7 @@ export type BuildChange = { } export function getJobs(): Promise { let jobs: Job[] = [] - let request = axios.get(`${JENKINS_URL}/${ARTIFACT_NAME}/api/json?pretty=true`) + let request = axios.get(`${JENKINS_URL}/${ARTIFACT_NAME}/api/json`) return new Promise((resolve, reject) => { request.then(value => { @@ -34,14 +34,14 @@ export function getJobs(): Promise { export function getBuilds(version: string): Promise { let builds: Build[] = [] - let request = axios.get(`${JENKINS_URL}/${ARTIFACT_NAME}/job/${version}/api/json?pretty=true`) + let request = axios.get(`${JENKINS_URL}/${ARTIFACT_NAME}/job/${version}/api/json`) return new Promise((resolve, reject) => { request.then(value => { builds = value.data.builds as Build[] let count = 0; for (let build of builds) { - axios.get(`${JENKINS_URL}/${ARTIFACT_NAME}/job/${version}/${build.number}/api/json?pretty=true`).then(value1 => { + axios.get(`${JENKINS_URL}/${ARTIFACT_NAME}/job/${version}/${build.number}/api/json`).then(value1 => { build.timestamp = value1.data.timestamp let changeSet: any[] = value1.data.changeSets if (changeSet.length > 0) {