Skip to content

Instantly share code, notes, and snippets.

@Mr-istov
Mr-istov / remove_protected_branches.js
Last active May 30, 2021 09:49
Delete protected branches on github
import { graphql } from "@octokit/graphql";
const OWNER = process.env.GITHUB_OWNER;
const REPO = process.env.GITHUB_REPO;
const GITHUB_TOKEN = process.env.GITHUB_TOKEN;
/**
* Return the last {num} branch IDs that start with the {prefix}
*
* Note: This will only retrieve the ref (branch) ID
import * as vault from "node-vault";
import * as aws4 from "aws4";
interface VaultRequest {
role: string;
iam_request_url: string;
iam_request_body: string;
iam_request_headers: string;
iam_http_request_method: string;
}