prow/deck/jobs/jobs.go
func (ja *JobAgent) GetProwJob(job, id string) (prowapi.ProwJob, error) {
	if ja == nil {
		return prowapi.ProwJob{}, fmt.Errorf("Prow job agent doesn't exist (are you running locally?)")
	}
	var j prowapi.ProwJob
	ja.mut.Lock()
	idMap, ok := ja.jobsIDMap[job]
	if ok {
		j, ok = idMap[id]
	}
	ja.mut.Unlock()
	if !ok {
		return prowapi.ProwJob{}, errProwjobNotFound
	}
	return j, nil
}
func (ja *JobAgent) GetProwJob(job, id string) (prowapi.ProwJob, error) {
	if ja == nil {
		return prowapi.ProwJob{}, fmt.Errorf("Prow job agent doesn't exist (are you running locally?)")
	}
	var j prowapi.ProwJob
	ja.mut.Lock()
	idMap, ok := ja.jobsIDMap[job]
	if ok {
		j, ok = idMap[id]
	}
	ja.mut.Unlock()
	if !ok {
		return prowapi.ProwJob{}, errProwjobNotFound
	}
	return j, nil
}
func ( ja * JobAgent ) GetProwJob ( job , id string ) ( prowapi . ProwJob , error ) { if ja == nil { return prowapi . ProwJob { } , fmt . Errorf ( " " ) } var j prowapi . ProwJob ja . mut . Lock ( ) idMap , ok := ja . jobsIDMap [ job ] if ok { j , ok = idMap [ id ] } ja . mut . Unlock ( ) if ! ok { return prowapi . ProwJob { } , errProwjobNotFound } return j , nil }
// GetProwJob finds the corresponding Prowjob resource from the provided job name and build ID
GetProwJob finds the corresponding Prowjob resource from the provided job name and build ID