DEV Community

Maroun Maroun
Maroun Maroun

Posted on

2 3

GitHub Bash API

I'm writing Bash scripts for the GitHub API in Bash.

This repo aims to expose basic functions for using the GitHub API in Bash, without any dependency on GitHub CLI tools.

You can copy any of the functions and use it wherever you want. For example, in your own GitHub action script.

Usage

Each file aggregates functions that are relevant for the specific API.

For example, the pull_request.sh script have functions that expose the Pull Requests API.

You can test each function by simply calling it inside the file. For example, to get the PRs count in some repository, you can call the prs_count function in the pull_requests.sh file, and then execute:

./pull_request.sh <token> <owner> <repo>

Which yields the number of PRs for the given repository.

I hope you find it useful! Your input is highly welcomed and appreciated.

Link to the repository: https://github.com/MarounMaroun/github-bash-api

Top comments (0)

πŸ‘‹ Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay