@@ -9,7 +9,7 @@ const CONFIG = {
99 owner : "codefresh-io" ,
1010 repo : "gitops-runtime-helm" ,
1111 latestPattern : / ^ ( \d { 2 } ) \. ( \d { 1 , 2 } ) - ( \d + ) $ / , // Format: YY.MM-patch (e.g., 25.04-1)
12- minStableVersion : "1.0.0" , // Stable versions start from 1.0.0
12+ minStableVersion : "1.0.0" ,
1313 securityFixesString : process . env . SECURITY_FIXES_STRING || "### Security Fixes:" ,
1414 maxReleasesPerChannel : 10 ,
1515 maxGithubReleases : 1000 ,
@@ -32,7 +32,6 @@ class VersionManager {
3232 const match = version . match ( this . latestPattern ) ;
3333 if ( match ) {
3434 const month = Number ( match [ 2 ] ) ;
35- // Validate month is 1-12
3635 if ( month >= 1 && month <= 12 ) {
3736 return "latest" ;
3837 }
@@ -55,7 +54,6 @@ class VersionManager {
5554 return `${ year } .${ month } .${ patch } ` ;
5655 }
5756 }
58- // Stable versions are already in semver format
5957 return version ;
6058 }
6159
@@ -224,7 +222,6 @@ class ReleaseProcessor {
224222 release . appVersion = await githubClient . getAppVersionFromChart ( release . version ) ;
225223 }
226224
227- // Mark upgrade availability and security vulnerabilities
228225 const latestRelease = sorted [ 0 ] || null ;
229226 const latestVersion = latestRelease ?. version ;
230227 const latestSecureIndex = latestWithSecurityFixes
@@ -361,14 +358,12 @@ class ReleaseIndexBuilder {
361358}
362359
363360async function main ( ) {
364- // Validate token
365361 const token = process . env . GITHUB_TOKEN ;
366362 if ( ! token ) {
367363 console . error ( "❌ GITHUB_TOKEN environment variable is required" ) ;
368364 process . exit ( 1 ) ;
369365 }
370366
371- // Initialize dependencies
372367 const octokit = new Octokit ( { auth : token } ) ;
373368 const versionManager = new VersionManager ( CONFIG . latestPattern , CONFIG . minStableVersion ) ;
374369 const githubClient = new GitHubReleaseClient (
@@ -381,7 +376,6 @@ async function main() {
381376 const releaseProcessor = new ReleaseProcessor ( versionManager , CONFIG . securityFixesString ) ;
382377 const builder = new ReleaseIndexBuilder ( CONFIG , githubClient , releaseProcessor , versionManager ) ;
383378
384- // Build index
385379 try {
386380 await builder . build ( ) ;
387381 } catch ( error ) {
0 commit comments