Skip to content

Dev - #25

Merged
blackdragoon26 merged 2 commits into
mainfrom
dev
Jul 8, 2026
Merged

Dev#25
blackdragoon26 merged 2 commits into
mainfrom
dev

Conversation

@blackdragoon26

@blackdragoon26 blackdragoon26 commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • The homepage now shows the latest release link dynamically, updating the version and destination automatically when available.
    • Added a release endpoint that provides the current release information for the site.
  • Bug Fixes

    • Improved fallback behavior so the latest release link still works if release data cannot be fetched.
    • Added support for clearer method handling on the release endpoint, including proper responses for unsupported requests.
  • Chores

    • Reduced unnecessary deployment activity by skipping builds for non-main branch commits.

@blackdragoon26
blackdragoon26 merged commit b8fc945 into main Jul 8, 2026
2 of 3 checks passed
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3cb41520-d061-4b42-b7fb-278f72ee2455

📥 Commits

Reviewing files that changed from the base of the PR and between d506d18 and e8f215b.

📒 Files selected for processing (3)
  • api/release.js
  • vercel.json
  • website/index.html

📝 Walkthrough

Walkthrough

Adds a new serverless API endpoint (api/release.js) that fetches the latest GitHub release with a fallback and caching headers, updates the homepage to dynamically display the fetched release info via a script, and adds a Vercel deployment ignore condition for non-main branches.

Changes

Latest release feature

Layer / File(s) Summary
Release fetch API implementation
api/release.js
New handler fetches the latest GitHub release over HTTPS with a 3-second timeout, restricts methods to GET/HEAD (405 otherwise), and returns release JSON with long-cache headers on success or fallback data (v1.1.0) with short-cache headers on failure.
Homepage release link update
website/index.html
The "Latest release" link gets a fallback version and an id; a new script fetches `/api/release`, and on success updates the link's text and href with the fetched tag and URL.
Deployment configuration
vercel.json
Adds an ignoreCommand to skip deployments when the git commit ref is not main.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant Handler as api/release.js
  participant GitHub as GitHub Releases API

  Browser->>Handler: GET /api/release
  Handler->>GitHub: HTTPS GET releases/latest
  alt success within timeout
    GitHub-->>Handler: JSON release data
    Handler-->>Browser: 200 tagName, url, long cache headers
  else error or timeout
    Handler-->>Browser: fallback tagName, url, short cache headers
  end
  Browser->>Browser: update link text and href
Loading

Related Issues: None specified.

Related PRs: None specified.

Suggested labels: enhancement, api

Suggested reviewers: blackdragoon26

🐰 A rabbit hops to fetch a tag,
From GitHub's nest, no need to lag,
If the fetch should stumble, fall,
A fallback link still serves them all,
Now homepages update in stride,
With release data as their guide! 🥕

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Comment @coderabbitai help to get the list of available commands.

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.

1 participant