- Linux/Mac/GitHub Codespace
- A GitHub Enterprise Server or dotcom org with a Enterprise admin user name and password
- A
jq
command on your client:
A few scripts use arrays in bash and for those you'll need to have bash 5.x. The bash delivered on Mac OS is 3.2 so brew install bash
may be needed if you want to use scripts that contain declare -A
then you can use /opt/homebrew/bin/bash
. These scripts were tested with 5.2.37 on Mac:
bash --version
GNU bash, version 5.2.37(1)-release (aarch64-apple-darwin24.0.0)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
brew install jq
- A Python >3.6 interpreter on your Mac.
- The JWT Rubygem required for GitHub App authentication:
sudo gem install jwt
- Create your token. In GitHub Enterprise (give it all the scopes. Be careful and give the token an expiry date if running on GitHub.com. Strongly recommend a token with short expiry time. If you find yourself creating a lot of tokens on a regular basis, then this tip for selecting all checkboxes on may be useful.
- Download the latest release.
- Unzip the release file to a directory of your choice.
- Change into the the directory and version of the power.
- Run
configure.py
to generate the.gh-api-examples.conf
file. This file feeds variables to the scripts in The Power.:
python3 configure.py
configure.py
asks questions, You need to provide your token and hostname of your
GHE server or enter api.github.com
if you are using GitHub.com enter api.github.com
as the hostname.
Enter GHE Hostname: myserver.example.com
Enter token: ***cc2d128a
- If you want a different team name, you can edit
.gh-api-examples.conf
with an editor of your choice.
Non-interactive values can be specified on the command line in order to use The Power in a custom automation:
python3 configure.py --hostname myserver.example.com \
--token ghp_****************************wh3Ybleu \
--webhook-url https://events.hookdeck.com/e/src_1hm2RSyiguMW
The --primer
flag may also be of interest. Provide the name of a primer script which will be executed when configure.py
is complete.
Optionally, edit .gh-api-examples.conf
to add any extra customizations you want to support.
bash build-all.sh
bash build-testcase