Attributes
Includes Deno configuration
Repository
Current version released
2 years ago
Dependencies
deno.land/x
skypack.dev
fast-json-patch@3.1.1
std
Codemod
Codemod module for making deterministic code modifications on GitHub.
Usage
import { GitHubCodemodBuilder } from "https://deno.land/x/codemod/github/mod.ts";
const result = await new GitHubCodemodBuilder({
owner: "EthanThatOneKid",
repo: "codemod",
token: GITHUB_TOKEN,
})
.setText("hello_world.txt", "Hello, World!")
.editText("friends.json", (content) => {
const friends = JSON.parse(content);
friends.push("EthanThatOneKid");
return JSON.stringify(friends);
})
.delete("goodbye_world.txt")
.createPR({
title: "Hello, World!",
body: "This is a test PR.",
message: "Add hello_world.txt",
newBranchName: "hello-world",
});
Get a GitHub personal access token here.
Fine-tune your personal access token by granting Read and write
access to only
Contents
and Pull requests
.
API
See https://deno.land/x/codemod for generated API documentation.
License
Made with 💖 by @EthanThatOneKid