You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfmt.Errorf("failed to fetch latest Go version: %v", err)
161
161
}
@@ -200,48 +200,40 @@ func validateRun() error {
200
200
return&ValidationError{Message: fmt.Sprintf("Your applications go version %v is no longer supported. Please upgrade to version %v.", repoVersion, newestGoVersion)}
201
201
} elseifrepoVersion<=newestGoVersion-0.01 {
202
202
// We'll give a PR comment to the Author to warn them about the need to upgrade
203
-
fmt.Printf("Warning: This applications go version will be out of support by the next major release. You will have until the next release before you need to upgrade to version %v\n", newestGoVersion)
203
+
fmt.Printf("A new Go version is out, released on (%v). After 6 months of release, Your current Go version (%v) will fail CI workflows if it is not upgraded.\n", releaseDate, f.Go.Version)
204
204
}
205
-
206
205
returnnil
207
206
}
208
207
209
-
// fetchLatestGoVersion fetches the latest Go version from the official Go download page.
210
-
funcfetchLatestGoVersion() (string, error) {
211
-
// official Go download page
212
-
resp, err:=http.Get("https://go.dev/dl/")
213
-
iferr!=nil {
214
-
return"", fmt.Errorf("failed to fetch Go download page: %v", err)
215
-
}
216
-
deferresp.Body.Close()
217
-
218
-
ifresp.StatusCode!=http.StatusOK {
219
-
return"", fmt.Errorf("failed to fetch Go download page: status code %d", resp.StatusCode)
220
-
}
221
-
222
-
bodyBytes, err:=io.ReadAll(resp.Body)
223
-
iferr!=nil {
224
-
return"", fmt.Errorf("failed to read response body: %v", err)
0 commit comments