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.
The Critical Rule
Section titled “The Critical Rule”- The most important rule: you must understand your code. If you can’t explain what your changes do and how they interact with the greater system without the aid of AI tools, do not contribute to this project.
- The second most important rule: when you submit a PR you must be willing to address comments and maintain this code. Dot not submit drive-by PRs that solve your own issue without the willingness to iterate on it. Keep these in your own fork.
- Using AI to write code is fine. You can gain understanding by interrogating an agent with access to the codebase until you grasp all edge cases and effects of your changes. What’s not fine is submitting agent-generated slop without that understanding. Be sure to read the AI Usage Policy.
AI Usage
Section titled “AI Usage”The project has strict rules for AI usage. Please see the AI Usage Policy. This is very important.
Quick Guide
Section titled “Quick Guide”I Have an Idea for a Feature
Section titled “I Have an Idea for a Feature”Like bug reports, first search through both issues and discussions and try to find if your feature has already been requested. Otherwise, open a discussion in the “Feature Requests, Ideas” category.
I’ve Implemented a Feature
Section titled “I’ve Implemented a Feature”- If there is an issue for the feature, open a pull request straight away.
- If there is no issue, open a discussion and link to your branch.
- If you want to live dangerously, open a pull request and hope for the best.
I Have a Question Which Is Neither a Bug Report nor a Feature Request
Section titled “I Have a Question Which Is Neither a Bug Report nor a Feature Request”Open a Q&A discussion, or join our Discord Server and ask away in the #help forum channel.
Working on the Code
Section titled “Working on the Code”Installing Required Tooling
Section titled “Installing 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.
- (Optional) Set up
direnvsodevbox shellruns automatically- direnv is a tool that allows setting unique environment variables per directory in your filesystem.
- Install
direnvwith: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
- Install
- direnv is a tool that allows setting unique environment variables per directory in your filesystem.
- (Optional) Install the VSCode Extension
- Follow this guide to set up VSCode to automatically run
devbox shell.
- Follow this guide to set up VSCode to automatically run
Troubleshooting
Section titled “Troubleshooting”- delete the
.devboxdirectory at the project’s root
Navigating the Codebase
Section titled “Navigating the Codebase”To navigate our codebase with confidence, familiarize 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 for 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
Debugging
Section titled “Debugging”- Write to the log by using Charm’s
logpackage - Tail the log by running
task logs - Run
dashin debug mode withtask debugin another terminal window / pane
import "charm.land/log/v2"
// more code...
log.Debug("Some message", "someVariable", someVariable)Running the Docs Locally
Section titled “Running the Docs Locally”- Run the docs site by running
task docs
- Go to
localhost:4321to view them