The Power is a simple test/learning framework to help you understand the GitHub API's. Add extra goodies to your GitHub Appliance or Organization on GitHub.com.
- What is the Power?
- Setup Instructions
- Contributing to The Power
- Known Issues/Problems/Solutions
- Testcases
The Power is a collection of scripts that demonstrate the GitHub APIs to create a usefully configured GitHub organization. The Power adds the following to a blank appliance or organization in <=30 seconds:
- Users
- A team of users.
- A private repository named testrepo with a branch called new_branch, a protected branch called protected_branch
- Branch protection rules set up on
protected_branch
. - A pull request on testrepo.
- A working CODEOWNERS file configured for the README.md file on testrepo.
- A requirements.txt file with vulnerabilities to trigger Dependabot
- A webhook on testrepo that outputs to a smee.io url.
- A Release.
- GitHub Pages configured for testrepo.
- A GitHub Gist.
- Mermaid diagrams using create-commit-mermaid.sh that demos some example diagram types on the mermaid project.
There are many other features and test-cases you can use or adapt to build scenarios of your own.
- Designed to be as simple as possible to understand.
- Almost exclusively uses only
curl
andjq
to complete most tasks. Only a few of the more complex scenarios have other dependencies.
There are hundreds of pre-baked scripts to:
- Create commits, secrets, hooks, issue comments, environments.
- Bulk up your appliance by creating hundreds or thousands of users/orgs/repos/teams/pull requests.
- Set up a Tiny GitHub App in less than 1 minute.
- Demonstrate GitHub Actions Workflows.
- Demonstrate CodeQL.
The Power is driven by it's configuration file .gh-api.examples.conf
. You can edit this to create new organizations, teams, users to use in test cases.
There are lots of great tools like Postman, JMeter for interacting with API's and building testsuites and many of the latest API's come with their own interactive documentation built-in like the swagger petstore. The Power is a solution for times and places where those tools just aren't available.