fix: make the github import button functional#630
Conversation
|
@srinathchoul-tech is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
komalharshita
left a comment
There was a problem hiding this comment.
Thank you for the contribution. The GitHub import functionality itself looks promising, and I appreciate the effort put into validating usernames, handling errors, and importing repository languages.
However, I’m requesting changes before this can be merged.
The main concern is scope: this PR replaces nearly the entire static/script.js file and introduces many unrelated changes (navigation, autocomplete, form handling, code viewer logic, scroll-to-top functionality, etc.) even though the issue is specifically about fixing the GitHub import button. This makes the PR difficult to review and increases the risk of unintended regressions.
Please update the PR by:
Limiting changes to the GitHub import functionality only.
Removing unrelated frontend refactors and feature changes.
Removing the new CHANGELOG.md addition from this PR.
Adding explicit handling for GitHub API rate-limit responses.
Reviewing whether repository primary languages alone are sufficient for imported skills.
Once the changes are scoped down and focused on Issue #630, I’d be happy to review it again.
|
Thank you for reviewing my pull request @komalharshita and suggesting the changes needed. |
Summary [required]
This PR fixes the "Import from GitHub" button functionality which was previously failing. The root cause was twofold:
addSkill()function actually to populate the search bar.async/await,Set, arrow functions), violating the project's strict ES5 compatibility rule.Related Issue [required]
Closes #448
Type of Change [required]
data/projects.jsonWhat Was Changed [required]
static/script.jsisIndexPageblock to fix scope, refactored ES6 to pure ES5, handled 404 username errors, and added inline comments.CHANGELOG.mdHow to Test This PR [required]
git checkout your-branch-namepip install -r requirements.txtpython app.pysrinathchoul-techor your own) and click "Fetch Skills".python tests/test_basic.pyExpected test output:
Test Results [required]
Screenshots (if UI change)
Before
attached-0.448.mp4
After
attached-1.448.1.mp4
Self-Review Checklist [required]
feat/,fix/,docs/,data/,style/,test/python tests/test_basic.pyand all 40 tests passflake8 .locally and there are no errorsprint()orconsole.log()debug statements