Scripts and tools for automating the running of The Octagon, a Smash Ultimate tournament hosted every Tuesday at 7pm at the Octopus Bar in Seattle. https://start.gg/octagon
Calls the start.gg GraphQL API
Run the CLI with the following command
go run . <args>If you want to see debug logs, add a DEBUG environment variable in the config or inline
DEBUG=1 go run . <args>If you want to contribute to the project, feel free to check out the GitHub issues and pick one up.
Whenever possible, add test cases for features
Please try to use conventional commit messages whenever possible.
Examples
feat: 'conflict remove' subcommand
fix: increase pageSize in getParticipants to prevent missing players
perf: cached getTournament responses
refactor: clean up bracket creation logic
docs: improve contribution instructions
chore: remove unnused commented code
style: whitespace changes to conflict list initialization
When running the octagon command it will check for a configuration file in ~/.config/octagon/octagonrc.
If it is unable to find a config file there, it will look for a local .env file.
STARTGG_API_KEY=
FIREBASE_API_KEY=
FIREBASE_DATABASE_URL=
OBS_WS_PORT=
OBS_WS_PASS=This will add the octagon command to your GOPATH,
allowing the command to be run from anywhere.
go build && go installIf you are using a local .env configuration instead of ~/.config/octagon, the command will fail outside of the source code directory.
View the command usage
octagon -hWhen the start.gg GraphQL schema updates,
you need to fetch the updated schema.graphql file and run
go get github.com/Khan/genqlient
npm install -g graphqurlDev API
cd startgg
gq https://api.start.gg/gql/alpha --introspect > schema.graphql \
-H 'Authorization: Bearer <API_KEY>'
go run github.com/Khan/genqlientProd API
cd startgg/prod
gq https://www.start.gg/api/-/gql --introspect \
-H 'x-web-source: gg-web-gql-client, gg-web-rest'
go run github.com/Khan/genqlient