Giter Club home page Giter Club logo

git-api-scripts's Introduction

git-api-scripts

Utility Functions to Interact with Git Rest and GraphQL API. A very common need because of which I had to create this project was to List and Delete Stale Branches.

Available Scripts

Currently, the only available script is delete-stale-branches(run with extreme caution). You can refer branch-utils.test.js to play around with other available interfaces.

How to Run

The project uses the dotenv package and thus expects a local .env file in the root of your project. After you create the file, add the following entries to it and run one of the node scripts,

GIT_BASE_URL=https://api.github.com or your enterprise API Address
GIT_ORG=Owner or the Org Name
GIT_REPO=Repository Name
GIT_ADMIN_PAC=Personal Access Token of a user who can perform read/write operations on the repository

After creating .env with the entries above, run the following scripts to first install the dependencies and then delete stale branches in your repository,

npm install
npm run delete-stale-branches

git-api-scripts's People

Contributors

dherenj84 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.