Skip to content

MarounMaroun/github-bash-api

Repository files navigation

GitHub Bash API Test APIs

Scripts for the GitHub API in Bash.

This repo aims to expose basic functions for using the GitHub API in Bash.

You can copy any of the functions and use them as you with. For example, in your own GitHub action script.

Usage

Each file aggregates functions that are relevant for the specific API. You can copy-paste whichever function that suits your needs.

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

You can call whichever function you want from your script. For example, to count the PRs of some repository:

#!/usr/bin/env bash

source "pull_request.sh"

prs_count <token> <owner> <repo>

For commenting on a PR, you should run:

#!/usr/bin/env bash

source "pull_request.sh"

comment_on_pr <token> <owner> <repo> <pr_num> <comment>

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License ⚖️

MIT

Releases

No releases published

Packages

No packages published

Languages