MCPcopy
hub / github.com/kubernetes/test-infra / get

Method get

triage/model.js:37–57  ·  view source on GitHub ↗
(job, number)

Source from the content-addressed store, hash-verified

35
36 // Create a build object given a job and build number.
37 get(job, number) {
38 let indices = this.jobs[job];
39 if (indices.constructor === Array) {
40 let [start, count, base] = indices;
41 if (number < start || number > start + count) {
42 console.error('job ' + job + ' number ' + number + ' out of range.');
43 return;
44 }
45 var index = base + (number - start);
46 } else {
47 var index = indices[number];
48 }
49 // Add more columns as necessary.
50 // This is faster than dynamically adding properties to an object.
51 return {
52 job: job,
53 number: number,
54 started: this.colStarted[index],
55 pr: this.colPr[index],
56 };
57 }
58
59 // Count how many builds a job has.
60 count(job) {

Callers 15

check_ci_jobsFunction · 0.45
mainFunction · 0.45
create_parserFunction · 0.45
mainFunction · 0.45
generate_oneFunction · 0.45
buildsForClusterFunction · 0.45
generate_job_reposFunction · 0.45
buildNumbersToHtmlFunction · 0.45
checkFunction · 0.45

Calls

no outgoing calls

Tested by 7

__call__Method · 0.36
test_no_versionMethod · 0.36
test_multi_repoMethod · 0.36
test_bootstrapFunction · 0.36
test_commit_in_metaMethod · 0.36