Sample GitHub API code for uploading files?

Open
#2 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
github, javascript, node.js
Domain
api, documentation

Research direction

Read the linked GitHub API documentation and the node-github toolkit first, focusing on repository file uploads and authentication. Done means providing a simple Node.js example that uploads one text file to a GitHub repository.

Written by the indexing model from the issue text.

Description

Short version

I'm looking for simple JavaScript example code to upload a single text file to a GitHub repository from a Node.js app.

Background

Andrew Shell had an interesting idea -- mirror my blog posts to a GitHub repository.

I like it because it provides an easy to manage archive, and takes care of distribution of updates.

I looked at the API and the JavaScript toolkits and how authentication works, and there are a lot of pieces to understand to get what I imagine will ultimately be a very small piece of code.

So I thought I'd ask if anyone has such code?

Of course I will re-share whatever I end up using.

Dominant language
HTML
Stars
134
Forks
10
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from scripting/Scripting-News

All issues in scripting/Scripting-News

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.