Last active
October 20, 2021 13:12
-
-
Save Jolg42/4fa6f7732bd22513c49ef868e246a71a to your computer and use it in GitHub Desktop.
Prisma Milestones
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Octokit } from "https://cdn.skypack.dev/@octokit/core"; | |
const token = Deno.env.get("GITHUB_TOKEN") | |
const octokit = new Octokit({ auth: token}); | |
const repos = await octokit.request('GET /user/repos'); | |
const milestones = [{ | |
"title": "3.4.0", | |
// "description": "" | |
"due_on": "2021-11-02T00:00:00Z" | |
}]; | |
console.log(repos) | |
// for (let r=0; r < repos.length; r++) { | |
// let repo = repos[r]; | |
// for (let m=0; m < milestones.length; m++) { | |
// let milestone = milestones[m]; | |
// let payload = { | |
// owner: repo.owner.login, | |
// repo: repo.name, | |
// title: milestone.title, | |
// description: milestone.description, | |
// due_on: milestone.due_on | |
// }; | |
// await octokit.request(`POST /repos/{owner}/{repo}/milestones`, payload); | |
// } | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment