Skip to content

Commit 973ed04

Browse files
chore: clean up comments and formatting in build-releases.js and README.md
1 parent 14c2e0d commit 973ed04

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

.github/scripts/release-index/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ flowchart TD
2222
style AcceptS fill:#87CEEB,stroke:#003d5c
2323
style Reject fill:#ffcccb,stroke:#8b0000
2424
style Latest fill:#e1f5ff,stroke:#0066cc
25-
style Stable fill:#f0fff0,stroke:#006400### Examples
25+
style Stable fill:#f0fff0,stroke:#006400
26+
27+
### Examples
2628

2729
| Input Version | Matches Pattern? | Month Valid? | Channel | Normalized | Valid? | Result |
2830
|--------------|------------------|--------------|---------|------------|--------|--------|

.github/scripts/release-index/build-releases.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

363360
async 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

Comments
 (0)