Track your Anki study sessions directly into Yōten.
at master 116 lines 3.4 kB view raw view rendered
1# Contributing guide 2 3## Commit guidelines 4 5We follow a commit style similar to the Go project. Please keep commits: 6 7- **Atomic**: Each commit should represent one logical change. 8- **Descriptive**: The commit message should clearly describe what the change 9 does and why it's needed. 10 11### Message format 12 13``` 14<type>(affected system): <short summary of change> 15 16 17Optional longer description, if necessary. Explain what the change does and 18why. Reference relevant issues or PRs when applicable via links. 19``` 20 21Examples 22 23``` 24fix(xp): update xp when a study session is deleted 25``` 26 27``` 28refactor(views/edit-activity): remove page handler in favor of direct invocation 29``` 30 31### General notes 32 33- PRs get merged "as-is" (fast-forward) - like applying a patch-series using 34 `git am`. There is no squashing so please author your commits as they would 35 appear on `master`, following the above guidelines. 36- Keep commits lowercased with no trailing period. 37- Use the imperative mood in the summary line (e.g., "fix bug" not "fixed bug" 38 or "fixes bug"). 39- Try to keep the summary line under 72 characters. 40- Follow the same formatting for PR titles if filled manually. 41- Don't include unrelated changes in the same commit. 42- Avoid noisy commit messages like "wip" or "final fix". Rewrite history before 43 submitting if necessary. 44 45## Proposals for bigger changes 46 47Small fixes like typos, minor bugs, or trivial refactors can be submitted 48directly as PRs. 49 50For larger changes—especially those introducing new features, significant 51refactoring, or altering system behavior—please open a proposal first. This 52helps us evaluate the scope, design, and potential impact before 53implementation. 54 55### Proposal format 56 57Create a new issue titled: 58 59``` 60proposal: <affected scope>: <summary of change> 61``` 62 63In the description, explain: 64 65- What the change is 66- Why it's needed 67- How you plan to implement it (roughly) 68- Any open questions or tradeoffs 69 70We'll use the issue thread to discuss and refine the idea before moving 71forward. 72 73## Developer certificate of origin (DCO) 74 75We require all contributors to certify that they have the right to submit the 76code they're contributing. To do this, we follow the [Developer Certificate of 77Origin (DCO)](https://developercertificate.org/). 78 79By signing your commits, you're stating that the contribution is your own work, 80or that you have the right to submit it under the project's license. This helps 81us keep things clean and legally sound. 82 83To sign your commit, just add the `-s` flag when committing: 84 85```sh 86git commit -s -m "your commit message" 87``` 88 89This appends a line like: 90 91``` 92Signed-off-by: Your Name <your.email@example.com> 93``` 94 95We won't merge commits if they aren't signed off. If you forget, you can amend 96the last commit like this: 97 98```sh 99git commit --amend -s 100``` 101 102If you're submitting a PR with multiple commits, make sure each one is signed. 103 104## Commit Authoring 105 106To ensure a consistent and clean project history, we use a `.mailmap` file to 107consolidate contributions from different email addresses. 108 109If you have committed to this project with multiple emails in the past, or plan 110to in the future, please add an entry to the `.mailmap` file in the root of the 111repository. This will ensure all your work is correctly attributed to a single 112identity. 113 114The format is: `Preferred Name <preferred@email.com> <old@email.com>` 115 116Please include this change in your first pull request.