Skip to content

Remove hardcoded fallback version from VersionParser#588

Merged
abraham merged 2 commits intomainfrom
copilot/remove-hardcoded-min-version
Jan 30, 2026
Merged

Remove hardcoded fallback version from VersionParser#588
abraham merged 2 commits intomainfrom
copilot/remove-hardcoded-min-version

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

The findMaxVersion method had a hardcoded '4.3.0' fallback that duplicated configuration already present in config.json.

Changes

  • Replace hardcoded '4.3.0' with MINIMUM_VERSION constant in findMaxVersion fallback
  • Update JSDoc to reference the constant

The MINIMUM_VERSION constant already reads from config.json at module initialization, maintaining a single source of truth for version configuration.

// Before
static findMaxVersion(versions: string[]): string {
  if (!versions || versions.length === 0) {
    return '4.3.0'; // Fallback to current hardcoded version
  }
  // ...
}

// After
static findMaxVersion(versions: string[]): string {
  if (!versions || versions.length === 0) {
    return MINIMUM_VERSION; // Fallback to minimum version from config
  }
  // ...
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • otel.cloud.redocly.com
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node node /home/REDACTED/work/mastodon-openapi/mastodon-openapi/node_modules/.bin/redocly lint --format=github-actions dist/schema.json (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Remove hardcoded fallback min version</issue_title>
<issue_description>in src/parsers/VersionParser.ts. It should be read from config.json instead.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: abraham <3341+abraham@users.noreply.github.com>
@abraham abraham marked this pull request as ready for review January 30, 2026 01:10
@abraham abraham merged commit c9e8b3a into main Jan 30, 2026
1 check passed
@abraham abraham deleted the copilot/remove-hardcoded-min-version branch January 30, 2026 01:10
Copilot AI restored the copilot/remove-hardcoded-min-version branch January 30, 2026 01:11
Copilot AI changed the title [WIP] Remove hardcoded fallback min version in VersionParser Remove hardcoded fallback version from VersionParser Jan 30, 2026
Copilot AI requested a review from abraham January 30, 2026 01:11
Copilot stopped work on behalf of abraham due to an error January 30, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove hardcoded fallback min version

2 participants