@elara-services/github
v1.0.4
Published
A misc github package for stuff idk
Downloads
2
Readme
Welcome to the GitHub package
Links:
Docs
Support
Patreon
PayPal
Getting Started
const { GitHub } = require(`@elara-services/github`);
const git = new GitHub(`gh-****`); // Your Github auth token.
Upload File:
const r = await git.files.create({
repo: {
owner: `Elara-Discord-Bots`, // The repo owner.
repo: "test", // Name of the github repo under the owner's account (org or user)
branch: "test", // THe branch to use under the repo. (OPTIONAL, default is 'main')
},
url: `https://example.com/file_name.ext`, // OPTIONAL, this will fetch the data from the url and create the file from that data.
data: `Content here`, // OPTIONAL, this will be the data added to the file.
// 'url' or 'data' is required. You can't have both
message: `The commit message`, // OPTIONAL, The default is `Upload file(s) via @elara-services/github@xxx`
});