Skip to content

fix: rebuild dist with correct GitHub Models endpoint and robust error handling - #3

Closed
Muneerali199 wants to merge 1 commit into
AOSSIE-Org:mainfrom
Muneerali199:fix/rebuild-dist-with-correct-github-models-endpoint
Closed

fix: rebuild dist with correct GitHub Models endpoint and robust error handling#3
Muneerali199 wants to merge 1 commit into
AOSSIE-Org:mainfrom
Muneerali199:fix/rebuild-dist-with-correct-github-models-endpoint

Conversation

@Muneerali199

@Muneerali199 Muneerali199 commented Mar 14, 2026

Copy link
Copy Markdown

Summary

Fixes #2

dist/index.js — the file action.yml points to via main: dist/index.js — was stale and calling the deprecated Azure endpoint, making prompt and advanced modes completely broken for all users. This PR rebuilds dist/ from the current src/ to fix it.

Root Cause

The build-dist.yml workflow rebuilds dist/ only when a PR is merged. src/agent.js was updated with a new endpoint, timeout, and error handling improvements — but a rebuild was never committed, leaving dist/index.js pointing at the old deprecated URL.

Changes in the rebuilt dist

Before (broken dist) After (this PR)
API endpoint models.inference.ai.azure.com (deprecated) models.github.ai/inference
Timeout None — hangs forever 30s AbortController
On API error core.setFailed — kills action core.warning + graceful []
JSON parse safety Crashes on bad AI response Try/catch with warning
Accept header Missing application/vnd.github+json
API version header Missing X-GitHub-Api-Version: 2026-03-10
Base issue dedup Missing Full case-insensitive deduplication

How to verify

node -e "
const fs = require('fs');
const d = fs.readFileSync('dist/index.js', 'utf8');
console.log('correct endpoint:', d.includes('models.github.ai'));
console.log('old endpoint gone:', !d.includes('models.inference.ai.azure.com'));
console.log('AbortController:', d.includes('AbortController'));
console.log('API version header:', d.includes('X-GitHub-Api-Version'));
"

All four lines should print true.

@github-actions github-actions Bot added no-issue-linked PR is not linked to any issue javascript JavaScript/TypeScript code changes size/L Large PR (201-500 lines changed) first-time-contributor First PR of an external contributor labels Mar 14, 2026
@coderabbitai

coderabbitai Bot commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • dist/index.js is excluded by !**/dist/**, !**/dist/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ed97a279-6628-423b-a7f1-3af01b35d4f6

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
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@github-actions

Copy link
Copy Markdown

Hello 👋 This PR has had no activity for more than 2 weeks. If you are still working on it, please push an update or leave a comment. Ping a maintainer if you believe it is ready for review or merge! This PR will be automatically closed in 7 days if there is no further activity.

@github-actions github-actions Bot added the Stale label Mar 29, 2026
@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown

This PR was automatically closed after being stale for 7 days with no activity. 😔 If you would like to continue, please reopen it and ping a maintainer for a review. Thank you for your contribution to AOSSIE! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time-contributor First PR of an external contributor javascript JavaScript/TypeScript code changes no-issue-linked PR is not linked to any issue pending-coderabbit-review size/L Large PR (201-500 lines changed) Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: dist/index.js is stale — calls deprecated Azure endpoint, breaking prompt/advanced modes entirely

1 participant