Skip to content

Commit bc98588

Browse files
committed
chore: update target_url once more
1 parent 4f39188 commit bc98588

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

server/keymanapp-test-bot/artifact-links-comment.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ export async function getArtifactLinksComment(
2323
return '';
2424
}
2525
//const statuses = await octokit.rest.repos.getCombinedStatusForRef({owner:'keymanapp',repo:'keyman',ref:'fix/web/5950-clear-timeout-on-longpress-flick'/*pull.data.head.ref*/});
26-
let s = {};
26+
let s: {[index:string]: {context:string, target_url:string, state:string}} = {};
2727
statuses.data.statuses.forEach(status => {
2828
if(s[status.context]) return;
2929
let o = {
3030
context: status.context,
31-
url: status.target_url,
31+
target_url: status.target_url,
3232
state: status.state,
3333
};
3434
s[status.context] = o;
@@ -104,7 +104,7 @@ export async function getArtifactLinksComment(
104104
}
105105
} else if(u.searchParams.has('buildTypeId') || u.pathname.match(/\/buildConfiguration\//)) {
106106
const { buildTypeId, buildId } = getTeamcityUrlParams(u);
107-
console.log(`[@keymanapp-test-bot] Finding TeamCity build data for build ${u.buildTypeId}:${u.buildId}`)
107+
console.log(`[@keymanapp-test-bot] Finding TeamCity build data for build ${buildTypeId}:${buildId}`)
108108

109109
buildData = findBuildData(s, buildTypeId, teamCityData);
110110

@@ -126,6 +126,9 @@ export async function getArtifactLinksComment(
126126
continue;
127127
}
128128
}
129+
if(version) {
130+
console.log(`[@keymanapp-test-bot] Found version data for ${buildTypeId}:${buildId}:${version}`)
131+
}
129132

130133
let t = artifactLinks.teamCityTargets[buildTypeId];
131134
if(t) {
@@ -190,7 +193,7 @@ function findBuildData(s, buildTypeId, teamCity) {
190193
// artifactLinks
191194
let u;
192195
try {
193-
u = new URL(s[context].target_url);
196+
u = new URL(s[context].url);
194197
} catch(e) {
195198
continue;
196199
}

0 commit comments

Comments
 (0)