Skip to content

Commit

Permalink
chore: repo cleanup and contributing doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredallard committed Apr 18, 2024
1 parent 23eed6f commit aa06c1b
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 23 deletions.
6 changes: 6 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ DB_PASS="supersecretpassword"
S3_ACCESS_KEY="minio"
S3_SECRET_KEY="minio123"
S3_BUCKET="binhost"

# docker-compose configuration
MINIO_ROOT_USER="minio"
MINIO_ROOT_PASSWORD="minio123"
POSTGRES_PASSWORD="supersecretpassword"
POSTGRES_DB="binhost"
14 changes: 0 additions & 14 deletions .github/pull_request_template.md

This file was deleted.

67 changes: 67 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Contribution Guidelines

Hello! Thanks for your interest in contributing to this project.
Outlined below are the expected guidelines for contributing. Please read
them carefully!

**Note**: This document does not cover things that would belong in a
code of conduct document.

## Table of Contents

<!-- !!! Generated !!! -->
<!-- toc -->
- [Contributing Code](#contributing-code)
- [Commit Format](#commit-format)
- [Pull Request Format](#pull-request-format)
- [Code Size](#code-size)
- [Code Style](#code-style)
<!-- /toc -->

## Contributing Code

Code contributions should follow the Github Pull Request model for all
changes, even for contributors with commit access. This means that you
should create a branch in a repo (even if it's your own fork) and create
a pull request from that branch into the main repo.

### Commit Format

Commits should follow the Conventional Commit format[^1]. However,
this is only a strong requirement for the Pull Request title and body,
because we **squash** commits on merge.

### Pull Request Format

We do not provide templates for pull requests because of our nature of
squash and merging using the PR body. As template would muddy each
commit's body. So, feel free to use whatever format you'd like, but we'd
like the following:

- A clear and concise title following conventional commit format[^1]
- A body that clearly explains the 5 W's of the change:
- **What** is the change?
- **Why** is the change necessary?
- **When** should the change be merged?
- **Who** is the change for?
- **Where** does the change apply?
- **This does not need to be a form! Just approach your wording from
these questions.**
- (Optional, but recommended): 72 character line wrap for the title and
body. (This is a soft limit, not a hard one.)

### Code Size

Please keep pull requests small and focused. If you have a large change
that you'd like to make, likely create an issue to discuss it first but
at the very least, think about how to break it apart into multiple
distinct changes. We're here to help you do that!

### Code Style

All code should be formatted and match the style of code around it.
While we don't have a strong code style guide, we do have automatic
formatters and linters. These can be run with `mise run fmt` and `mise
run lint` respectively.

[^1]: [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0)
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
A Gentoo binary host platform. Enables building and tracking various
targets.

## Table of Contents

<!-- toc -->
- [API](#api)
- [<code>POST /v1/upload</code>](#post-v1upload)
- [<code>GET /v1/targets</code>](#get-v1targets)
- [<code>POST /v1/targets/:target</code>](#post-v1targetstarget)
- [License](#license)
<!-- /toc -->

## API

Loose documentation of the API provided by `binhost` is below.
Expand Down
11 changes: 2 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
version: "3.8"

services:
db:
image: postgres:16-alpine
restart: on-failure
shm_size: 128mb
ports:
- "5432:5432/tcp"
environment:
POSTGRES_PASSWORD: supersecretpassword
# Create DB
POSTGRES_DB: binhost
env_file: .env.development

s3:
image: minio/minio
restart: on-failure
ports:
- "9000:9000/tcp"
- "9001:9001/tcp"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
env_file: .env.development
entrypoint:
- /usr/bin/env
- sh
Expand Down
8 changes: 8 additions & 0 deletions scripts/update-markdown-tocs-sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Updates all markdown files in the repository with the latest table of
# contents based on their contents.

# TOOL_VERSION is the version of the mdtoc tool to use.
TOOL_VERSION=v1.3.0

exec find . -name '*.md' -exec go run sigs.k8s.io/mdtoc@"$TOOL_VERSION" --inplace --max-depth=5 {} + -print

0 comments on commit aa06c1b

Please sign in to comment.