2.5 KiB
title | sidebar | showTitle |
---|---|---|
Development Process | Handbook | true |
Note: This guide is aimed at people who work for PostHog. If you want to contribute, see our Contributing Guide.
Any process is a balance between speed and control. If we have a long process that requires extensive QA and 10 approvals, we will never make mistakes because we will never release anything.
However, if we have no checks in place, we will release quickly but everything will be broken.
1. How to Decide What to Build
There are 3 places that work comes from.
- Issues/bugs (raised by the community or us)
- Roadmap
- "This should be better"
2. Sizing a Task
When picking up a task, it should be doable in a day, including code review and QA. If it's not, you need to break it down into smaller chunks until it is. Tasks of this size are easy to test, easy to deploy, less likely to cause merge conflicts, and should still deliver some kind of value.
Even if you're contributing, this is helpful as it means you'll be able to contribute to PostHog faster.
3. Writing Code
We're big fans of Test Driven Development (TDD). We've tried to create test infrastructure that helps you rather than annoys you. If that isn't the case, please raise an issue! Keeping tests on point is a high priority to keep developer productivity high.
Other than that, you know what to do in this section.
4. Creating a PR
To make sure our issues are linked correctly to the PRs, you can tag the issue in your commit.
git commit -m "Closes #289 add posthog logo to website"
5. Code Review
When we review a PR, we'll look at the following things:
- Does the PR actually solve the issue?
- Does the solution make sense?
- Will the code perform with millions of events/users/actions?
- Are there tests and do they test the right things?
- Are there any security flaws?
Things we do not care about during review:
- Syntax. If we're arguing about syntax, that means we should install a code formatter
See: How we review.
7. Merging
Merge anytime. Friday afternoon? Merge.
Our testing, reviewing and building process should be good enough that we're comfortable merging any time.
How to Test
See: How to test.
How we Review
See: How we review.
How to release a new version
See: Release new version.