Integrate GitHub API to Export Snippets as Gists
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- github, javascript
- Domain
- api, authentication, frontend, web-dev
Research direction
Start by locating the snippet cards and their .snippet-actions container, then inspect how snippets and localStorage are currently handled. Implement the Share to Gist flow with the GitHub REST API, token prompt and storage, success text, and a new-tab Gist link; done means the described behavior works for a snippet.
Written by the indexing model from the issue text.
Description
⚠️ Competition Only
This issue was created exclusively for participants of SourceSprint'26, an open-source competition held at VIT Vellore.
Pull requests submitted for this issue will only be accepted from registered SourceSprint'26 participants. Pull requests from others will be closed without review.
Description
CodeVault is great for local storage, but sometimes developers need to share a snippet with a team or link it in a forum. We should add a "Share to Gist" button on the snippet cards that uses the GitHub REST API to automatically create a secret GitHub Gist containing the snippet's code.
Expected Behavior
- Add a new button to the .snippet-actions container.
- When clicked, the app should prompt the user for a GitHub Personal Access Token (PAT) if they haven't provided one yet, and save it in
localStoragesecurely. - Use the JavaScript
fetch()API to send a POST request to[https://api.github.com/gists](https://api.github.com/gists)with the snippet's title and code. - Upon success, change the button text to "Gist Created!" and open the new Gist link in a new tab.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 20
- Avg merge
- 25m
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IEEE-VIT/code-block
-
medium SourceSprint '26
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
IEEE-VIT/code-block#14 ·
All issues in IEEE-VIT/code-block
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
curation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
amponce/archive-movie-browser#186 ·
-
light
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
aemdemos/patients-stryker#253 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
clerk/javascript#9852 ·