prow/cmd/deck/pr_history.go
func parsePullURL(u *url.URL) (org, repo string, pr int, err error) {
	var prStr string
	vals := u.Query()
	if org = vals.Get("org"); org == "" {
		return "", "", 0, fmt.Errorf("no value provided for org")
	}
	if repo = vals.Get("repo"); repo == "" {
		return "", "", 0, fmt.Errorf("no value provided for repo")
	}
	prStr = vals.Get("pr")
	pr, err = strconv.Atoi(prStr)
	if err != nil {
		return "", "", 0, fmt.Errorf("invalid PR number %q: %v", prStr, err)
	}
	return org, repo, pr, nil
}
func parsePullURL(u *url.URL) (org, repo string, pr int, err error) {
	var prStr string
	vals := u.Query()
	if org = vals.Get("org"); org == "" {
		return "", "", 0, fmt.Errorf("no value provided for org")
	}
	if repo = vals.Get("repo"); repo == "" {
		return "", "", 0, fmt.Errorf("no value provided for repo")
	}
	prStr = vals.Get("pr")
	pr, err = strconv.Atoi(prStr)
	if err != nil {
		return "", "", 0, fmt.Errorf("invalid PR number %q: %v", prStr, err)
	}
	return org, repo, pr, nil
}
func parsePullURL ( u * url . URL ) ( org , repo string , pr int , err error ) { var prStr string vals := u . Query ( ) if org = vals . Get ( " " ) ; org == " " { return " " , " " , 0 , fmt . Errorf ( " " ) } if repo = vals . Get ( " " ) ; repo == " " { return " " , " " , 0 , fmt . Errorf ( " " ) } prStr = vals . Get ( " " ) pr , err = strconv . Atoi ( prStr ) if err != nil { return " " , " " , 0 , fmt . Errorf ( " " , prStr , err ) } return org , repo , pr , nil }
// parsePullURL parses PR history URLs. Expects this format:
// .../pr-history?org=<org>&repo=<repo>&pr=<pr number>
parsePullURL parses PR history URLs . Expects this format : ... / pr - history?org = <org > &repo = <repo > &pr = <pr number >