Skip to content

Releases: editor-code-assistant/eca-mise-plugin

v1.0.2 - feat(helper): add github_request and use it in hooks

10 Nov 21:58
e166375

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.0.1...v1.0.2

Add a new helper.github_request(url) to centralize GitHub API calls with optional
authentication and improved error handling. The helper will:

  • read GitHub tokens from GITHUB_TOKEN, GH_TOKEN, or GITHUB_API_TOKEN environment variables and set an Authorization Bearer header when present
  • always set a User-Agent header required by the GitHub API
  • perform an http.get with provided headers and return (resp, nil) on success or (nil, err_msg) on failure
  • return a helpful message for 403 responses (rate limit exceeded) and suggest setting a token when unauthenticated
  • return an error for non-200 status codes and propagate HTTP request errors

Use the new helper in hooks:

  • hooks/available.lua: require helper and replace direct http.get with helper.github_request for release listing; simplify error handling and decoding of resp.body
  • hooks/pre_install.lua: require helper and replace manual OS/arch normalization with helper.get_os() and helper.get_arch(); use helper.github_request to fetch the .sha256 checksum and handle the possibility of nil responses; remove direct http usage

Update README.md:

  • add "GitHub API Rate Limiting" section explaining how to set a personal access token via environment variables (GITHUB_TOKEN, GH_TOKEN, or GITHUB_API_TOKEN) with examples and a link to create a token on GitHub

Other small changes:

  • remove unused local http requires from modified hooks
  • adjust error messages and condition checks around API responses to use the helper's return conventions

v1.0.1

26 Sep 14:53
18c25db

Choose a tag to compare

Initial release of eca-mise-plugin

Support for all ECA platforms (Linux x64/ARM64, macOS Intel/Apple Silicon, Windows x64)
Automatic version detection from GitHub releases API
SHA256 checksum verification when available
Cross-platform installation with proper permissions
Installation verification to ensure binary works
Comprehensive test suite

Features

Downloads ECA binaries from official GitHub releases
Uses static Linux builds for better compatibility
Sets executable permissions on Unix systems
Configures PATH environment variable
Supports all ECA release versions

Full Changelog: https://github.com/editor-code-assistant/eca-mise-plugin/commits/v1.0.1