Contributing
Thank you for investing your time in contributing to our project!
In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.
Install Required Tooling
Section titled “Install Required Tooling”Our project uses Devbox to manage its development environment.
Using Devbox will get your dev environment up and running easily and make sure we’re all using the same tools with the same versions.
- Clone this repo
git clone git@github.com:dlvhdr/gh-dash.git && cd gh-dash- Install
devbox
curl -fsSL https://get.jetpack.io/devbox | bash- Start the
devboxshell and run the setup (will take a while on first time)
devbox shellThis will create a shell where all required tools are installed.
Automatic devbox shell (Optional)
Section titled “Automatic devbox shell (Optional)”Set up direnv so devbox shell runs automatically
- Install with your package manager e.g.
brew install direnv - Add the following line at the end of the
~/.bashrcfile:eval "$(direnv hook bash)"- See direnv’s installation instructions for other shells.
- Enable
direnvby runningdirenv allow
If using VSCode, Install the extension:
- Follow this guide to set up VSCode to automatically run
devbox shell.
Troubleshooting
Section titled “Troubleshooting”- delete the
.devboxdir at the project’s root
Getting Started
Section titled “Getting Started”To navigate our codebase with confidence, familiar yourself with:
- Bubbletea - the TUI framework we’re using
- The Elm architecture
- charmbracelet/glow - for parsing and presenting markdown
Code structure
Section titled “Code structure”ui/- this is the code that’s responsible on rendering the different parts of the TUIdata/- the code that fetches data from GitHub’s GraphQL APIconfig/- code to parse the user’sconfig.ymlfileutils/- various utilities
Issues
Section titled “Issues”Create a new issue
Section titled “Create a new issue”If you spot a problem, first search if an issue already exists.
If a related issue doesn’t exist, you can open a new issue using a relevant issue form.
Solve an issue
Section titled “Solve an issue”Scan through our existing issues to find one that interests you.
Pull Request
Section titled “Pull Request”When you’re finished with the changes, create a pull request.
- Fill the “Ready for review” template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request.
- Don’t forget to link PR to issue if you are solving one.
Debugging
Section titled “Debugging”- Pass the debug flag:
go run gh-dash.go --debug - Write to the log using Go’s builtin
logpackage - View the log by running
tail -f debug.log
import "github.com/charmbracelet/log"
// more code...
log.Debug("Some message", "someVariable", someVariable)Your PR is merged!
Section titled “Your PR is merged!”Congratulations 🎉🎉