Skip to content

fix: use backticks for template literals in github.ts - #819

Open
saurabhhhcodes wants to merge 1 commit into
Aditya948351:masterfrom
saurabhhhcodes:fix/DevPath-Web-batch-7
Open

fix: use backticks for template literals in github.ts#819
saurabhhhcodes wants to merge 1 commit into
Aditya948351:masterfrom
saurabhhhcodes:fix/DevPath-Web-batch-7

Conversation

@saurabhhhcodes

Copy link
Copy Markdown
Contributor

Template literals using single quotes instead of backticks caused ${GITHUB_API} and ${DEVPATH_REPO} to render as literal strings instead of interpolating variable values. This broke all GitHub API calls.

Fixes:

  • src/lib/github.ts:8 - Changed to for `/user`\n- `src/lib/github.ts:20` - Changed to for /user/repos\n- src/lib/github.ts:79,88 - Changed to `` for /repos/DEVPATH_REPO/stats/contributors

Template literals were using single quotes instead of backticks,
causing ${GITHUB_API} and ${DEVPATH_REPO} to be treated as literal
strings instead of interpolated variables. This broke all GitHub API
calls by requesting literal URLs like '${GITHUB_API}/user' instead
of the actual API endpoint.
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