Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 4.10 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ocp-release-finder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var prd PullRequestData
var releaseStatusCrawler *colly.Collector
var releasePageCrawler *colly.Collector

const OPENSHIFT_RELEASE_DOMAIN string = "openshift-release.svc.ci.openshift.org"
const OPENSHIFT_RELEASE_DOMAIN string = "openshift-release.apps.ci.l2s4.p1.openshiftapps.com" //"openshift-release.svc.ci.openshift.org"
const PR_DATE_FORMAT string = "2006-01-02-150405"

// Gets a PR URL and returns the organization, repo and ID of that PR.
Expand Down Expand Up @@ -93,7 +93,7 @@ func createPullRequestData(prURL string) (PullRequestData, error) {
}

func filterReleasesLinks(e *colly.HTMLElement) {
reRelease := regexp.MustCompile(`\d\.\d\.\d-\d\.(nightly|ci)-\d{4}-\d{2}-\d{2}-\d{6}`)
reRelease := regexp.MustCompile(`\d\.\d+\.\d-\d\.(nightly|ci)-\d{4}-\d{2}-\d{2}-\d{6}`)
if !reRelease.MatchString(e.Text) {
return
}
Expand All @@ -102,7 +102,7 @@ func filterReleasesLinks(e *colly.HTMLElement) {
d = strings.Split(d, " ")[0]
tr, err := time.Parse(PR_DATE_FORMAT, d)
if err != nil {
fmt.Printf("Error time.Parse: ", err)
fmt.Printf("Error time.Parse: %v ", err)
}
// Check if PR merge time t is after the release creation time tr
if prd.mDate.After(tr) {
Expand Down
Binary file modified ocp-release-finder/ocp-release-finder
Binary file not shown.