Skip to content

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Aug 2, 2025

closes #489

@caarlos0 caarlos0 requested review from crazy-max and Copilot August 2, 2025 03:55
@caarlos0 caarlos0 self-assigned this Aug 2, 2025
@caarlos0 caarlos0 added the enhancement New feature or request label Aug 2, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR optimizes the GitHub release resolution process by skipping the expensive JSON fetch operation when a specific version (not a version range) is requested. Instead of always checking the releases JSON file, it validates if the version is a specific semantic version and directly constructs the tag name.

Key changes:

  • Added early return path for specific semantic versions to avoid unnecessary network calls
  • Preserved existing logic for handling GoReleaser Pro suffix for versions < 2.7.0
  • Added comprehensive test coverage for the new optimization path

Reviewed Changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/github.ts Implements early return optimization for specific versions in getReleaseTag function
tests/github.test.ts Adds test cases to verify the optimization works for versions with and without 'v' prefix

@crazy-max crazy-max merged commit 9a6cd01 into master Aug 2, 2025
39 checks passed
@crazy-max crazy-max deleted the releases-json branch August 2, 2025 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide an option to skip version check over https://goreleaser.com/static/releases.json
3 participants