GitHub Bash API

marounmaroun profile image Maroun Maroun ・1 min read

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.


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


Editor guide