Skip to content

fix: use git-only metadata for updater --gui channel picker#159

Merged
Nat3z merged 2 commits into
mainfrom
nat-openclaw/issue-158-issue-158-1780518367279-43nlla
Jun 3, 2026
Merged

fix: use git-only metadata for updater --gui channel picker#159
Nat3z merged 2 commits into
mainfrom
nat-openclaw/issue-158-issue-158-1780518367279-43nlla

Conversation

@nat-openclaw

Copy link
Copy Markdown
Collaborator

Summary

  • When the standalone updater runs with --gui, branch list and recent commit metadata load via git only (getBranchesViaGit / getRecentCommitsViaGit), avoiding unauthenticated GitHub REST API calls that hit rate limits.
  • Non---gui paths keep the existing GitHub API-first flow with git fallback on rate-limit errors.
  • Release checks (/releases) after channel selection are unchanged.

Closes #158

Test plan

  • bun run build in updater/ (TypeScript compile)
  • Launch updater with --gui, open bleeding-edge picker; confirm branches/commits load without api.github.com calls for branches/commits

Made with Cursor

Skip GitHub REST API for branch and commit lists when --gui is set so
unauthenticated clients avoid rate limits; keep API-first path elsewhere.
@vercel

vercel Bot commented Jun 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
open-game-installer-web Ready Ready Preview, Comment Jun 3, 2026 8:32pm

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2bc3fbc7-7c8d-432a-ac5c-6e9eedef3d52

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nat-openclaw/issue-158-issue-158-1780518367279-43nlla

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@Nat3z Nat3z left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@nat-openclaw please fix all of these.

Comment thread updater/src/main.ts Outdated
}

ipcMain.handle('get-branches', async () => {
if (hasArg('--gui')) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@nat-openclaw get rid of the original github api implementation and simplify it to just the git version.

Comment thread updater/src/main.ts Outdated
ipcMain.handle('get-recent-commits', async (_event, branch) => {
const targetBranch =
typeof branch === 'string' && branch ? branch : DEFAULT_BLEEDING_EDGE_BRANCH;
if (hasArg('--gui')) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@nat-openclaw and here too

@nat-openclaw

nat-openclaw commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author
▶️ Actions Performed
  • Remove GitHub API paths from get-branches and get-recent-commits handlers — Editing updater/src/main.ts IPC handlers
  • Delete dead GitHub metadata helpers (getBranchTipDate, shouldFallbackToGitForGitHubApi, etc.)
  • Rename git helpers and simplify IPC handlers
  • Run updater build to verify — Running bun run build in updater/
  • Commit and push changes — Committing and pushing to PR branch

@nat-openclaw

nat-openclaw commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author
▶️ Actions Performed
  • Remove GitHub API helpers and rate-limit fallback from updater/src/main.ts — Removing API helpers and fallback logic
  • Wire get-branches and get-recent-commits IPC handlers to git-only paths
  • Run updater build and commit/push to PR branch — Build passed; committed and pushed

@nat-openclaw

nat-openclaw commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author
▶️ Actions Performed
  • Inspect get-recent-commits IPC handler — remove API/--gui branching — get-recent-commits calls getRecentCommits() (git only); no API/--gui branch
  • Confirm get-branches is also git-only (same review pattern) — get-branches same pattern; releases API unchanged at line 893
  • Run updater build (bun run build) — tsc build succeeded
  • Push if any fixes; otherwise confirm no commit needed — No local changes; bd73ee2 already on origin

@nat-openclaw

Copy link
Copy Markdown
Collaborator Author

Fixed both review points in updater/src/main.ts: branch and commit loading now always uses git, with the old GitHub API / rate-limit fallback code removed. Release fetching is unchanged.

Built it with bun run build in updater/, and the changes were pushed as bd73ee2.

@nat-openclaw

Copy link
Copy Markdown
Collaborator Author

Yep — I stripped out the original GitHub API path for branch/commit metadata, so both get-branches and get-recent-commits now use git only. The release check still goes through the GitHub API as before.

I also ran cd updater && bun run build and it passed.

@nat-openclaw

Copy link
Copy Markdown
Collaborator Author

get-recent-commits is covered too — both branch/commit pickers are git-only now in bd73ee2, with no --gui branching or GitHub API calls in those handlers. --gui is still used for the channel picker, and releases still come from the API.

I re-ran cd updater && bun run build and it passed. Working tree is clean, so there wasn’t anything new to commit or push.

Ready for another look when you are.

@Nat3z Nat3z left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

beautiful. LGTM

@Nat3z Nat3z merged commit 66c562d into main Jun 3, 2026
7 checks passed
@Nat3z Nat3z deleted the nat-openclaw/issue-158-issue-158-1780518367279-43nlla branch June 3, 2026 20:34
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.

Updater Remove Rate Limit GitHub

2 participants