Skip to content

Instantly share code, notes, and snippets.

View amithalder-den's full-sized avatar
😃

amithalder-den

😃
View GitHub Profile
@amithalder-den
amithalder-den / deleteFolder.js
Created February 13, 2023 11:42 — forked from quilicicf/deleteFolder.js
Delete a folder from a GitHub repository using the REST API
/**
* This file shows how to delete a folder from a GitHub repository using the REST v3 API
* Because it is not trivial...
* It was last tested to work on 2020/12/11
*
* The script is supposed to be called like this: node commit.js quilicicf Depotware myBranch
* Where the arguments are in order: the owner of the repository, the name of the repository and
* the name of the branch where the commit will be done.
*
* It assumes there is a valid GitHub personal access token available as environment variable: GITHUB_TOKEN