Tech News
← Back to articles

The Lifecycle of a Pull Request

read original related products more articles

we shipped a bunch of PR features recently; here's how we built it

We’ve spent the last couple of weeks building out a pull request system for Tangled, and today we want to lift the hood and show you how it works.

If you’re new to Tangled, read our intro for the full story!

You have three options to contribute to a repository:

Paste a patch on the web UI

Compare two local branches (you’ll see this only if you’re a collaborator on the repo)

Compare across forks

Whatever you choose, at the core of every PR is the patch. First, you write some code. Then, you run git diff to produce a patch and make everyone’s lives easier, or push to a branch, and we generate it ourselves by comparing against the target.

patch generation

When you create a PR from a branch, we create a “patch” by calculating the difference between your branch and the target branch. Consider this scenario:

... continue reading