{"id":17071662,"url":"https://github.com/rikukissa/stacker","last_synced_at":"2025-04-12T19:53:02.569Z","repository":{"id":42113489,"uuid":"115273439","full_name":"rikukissa/stacker","owner":"rikukissa","description":"🥞 Chrome extension for managing stacked pull requests","archived":false,"fork":false,"pushed_at":"2022-12-07T17:21:29.000Z","size":4457,"stargazers_count":80,"open_issues_count":26,"forks_count":0,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2024-04-14T05:07:03.784Z","etag":null,"topics":["chrome-extension","github","preact","typescript"],"latest_commit_sha":null,"homepage":"https://chrome.google.com/webstore/detail/stacker/apkgobbdndlnnelabdjdapopocfcgbhf","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rikukissa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-24T15:58:19.000Z","updated_at":"2024-01-13T23:57:41.000Z","dependencies_parsed_at":"2023-01-24T19:17:39.693Z","dependency_job_id":null,"html_url":"https://github.com/rikukissa/stacker","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikukissa%2Fstacker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikukissa%2Fstacker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikukissa%2Fstacker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikukissa%2Fstacker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rikukissa","download_url":"https://codeload.github.com/rikukissa/stacker/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625509,"owners_count":21135513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome-extension","github","preact","typescript"],"created_at":"2024-10-14T11:37:14.522Z","updated_at":"2025-04-12T19:53:02.539Z","avatar_url":"https://github.com/rikukissa.png","language":"TypeScript","readme":"[![Build Status](https://travis-ci.org/rikukissa/stacker.svg?branch=develop)](https://travis-ci.org/rikukissa/stacker)\n[![Sponsored](https://img.shields.io/badge/chilicorn-sponsored-brightgreen.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAMAAADjyg5GAAABqlBMVEUAAAAzmTM3pEn%2FSTGhVSY4ZD43STdOXk5lSGAyhz41iz8xkz2HUCWFFhTFFRUzZDvbIB00Zzoyfj9zlHY0ZzmMfY0ydT0zjj92l3qjeR3dNSkoZp4ykEAzjT8ylUBlgj0yiT0ymECkwKjWqAyjuqcghpUykD%2BUQCKoQyAHb%2BgylkAyl0EynkEzmkA0mUA3mj86oUg7oUo8n0k%2FS%2Bw%2Fo0xBnE5BpU9Br0ZKo1ZLmFZOjEhesGljuzllqW50tH14aS14qm17mX9%2Bx4GAgUCEx02JySqOvpSXvI%2BYvp2orqmpzeGrQh%2Bsr6yssa2ttK6v0bKxMBy01bm4zLu5yry7yb29x77BzMPCxsLEzMXFxsXGx8fI3PLJ08vKysrKy8rL2s3MzczOH8LR0dHW19bX19fZ2dna2trc3Nzd3d3d3t3f39%2FgtZTg4ODi4uLj4%2BPlGxLl5eXm5ubnRzPn5%2Bfo6Ojp6enqfmzq6urr6%2Bvt7e3t7u3uDwvugwbu7u7v6Obv8fDz8%2FP09PT2igP29vb4%2BPj6y376%2Bu%2F7%2Bfv9%2Ff39%2Fv3%2BkAH%2FAwf%2FtwD%2F9wCyh1KfAAAAKXRSTlMABQ4VGykqLjVCTVNgdXuHj5Kaq62vt77ExNPX2%2Bju8vX6%2Bvr7%2FP7%2B%2FiiUMfUAAADTSURBVAjXBcFRTsIwHAfgX%2FtvOyjdYDUsRkFjTIwkPvjiOTyX9%2FAIJt7BF570BopEdHOOstHS%2BX0s439RGwnfuB5gSFOZAgDqjQOBivtGkCc7j%2B2e8XNzefWSu%2BsZUD1QfoTq0y6mZsUSvIkRoGYnHu6Yc63pDCjiSNE2kYLdCUAWVmK4zsxzO%2BQQFxNs5b479NHXopkbWX9U3PAwWAVSY%2FpZf1udQ7rfUpQ1CzurDPpwo16Ff2cMWjuFHX9qCV0Y0Ok4Jvh63IABUNnktl%2B6sgP%2BARIxSrT%2FMhLlAAAAAElFTkSuQmCC)](http://spiceprogram.org/oss-sponsorship)\n\n\u003cp align=\"center\" style=\"color: #343a40\"\u003e\n  \u003cimg src=\"./.github/logo.svg\" alt=\"logo\" height=\"150\" width=\"150\"\u003e\n  \u003ch1 align=\"center\"\u003eStacker\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eBecause no one really reviews a 4000 line PR\u003cbr/\u003e \u003ca href=\"https://chrome.google.com/webstore/detail/apkgobbdndlnnelabdjdapopocfcgbhf\"\u003eDownload the Chrome extension\u003c/a\u003e\u003cbr /\u003e\u003cbr /\u003e\n\u003c/p\u003e\n\n\u003ch2\u003eTL;DR\u003c/h2\u003e\n\u003ca href=\"https://www.youtube.com/watch?v=29abmnoLS5w\"\u003e\n  \u003cimg align=\"right\" width=\"400px\" alt=\"YouTube intro\" src=\"./.github/intro.png\" /\u003e\n\u003c/a\u003e\n\nStacker adds features to Github's UI which makes managing and reviewing pull requests easier.\n\n\u003cstrong\u003eFeatures:\u003c/strong\u003e\u003cbr /\u003e\n\u003cul\u003e\n  \u003cli\u003e\n    \u003ca href=\"#mark-pull-request-as-dependent-of-your-previous-work\"\u003e\n      📝 Visualizes pull request dependencies\n    \u003c/a\u003e\u003cbr /\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\n    \u003ca href=\"#only-see-changes-made-in-the-pr-youre-reviewing\"\u003e\n      🔎 Only shows you relevant changes when reviewing a pull request\n    \u003c/a\u003e\u003cbr /\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\n    \u003ca href=\"#automatic-warnings-of-pull-request-dependencies\"\u003e\n      ⚠️ Prevents accidental merges of unfinished work\n    \u003c/a\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\u003cbr /\u003e\n\n## Motivation\n\n\u003cimg align=\"right\" width=\"400px\" alt=\"Tweet\" src=\"./.github/tweet.png\" /\u003e\n\nReviewing and even creating pull requests on Github can sometimes be very frustrating. Especially when you're reviewing a PR so large that it becomes difficult to follow what is happening. A solution for this is to start thinking of pull requests as smaller increments than, for example a feature. Don't get me wrong, they should still be logical increments and not just some random blobs of commits, but the idea remains the same. They should be broken up into smaller pieces.\n\u003cbr /\u003e\nStacker is a Chrome extension that makes your life that tiny bit easier. It makes minor additions to Github's UI that help you visualize the pull request dependency structure.\n\nIf you are not familiar with the concept of stacked pull requests, jump right into [\"So what are stacked pull requests?\"](#so-what-are-stacked-pull-requests) section.\n\n## Installation\n\n1. Download [the extension](https://chrome.google.com/webstore/detail/apkgobbdndlnnelabdjdapopocfcgbhf)\n2. Generate a new [personal access token](https://github.com/settings/tokens) and add the following scopes:\n\n\u003cimg alt=\"scopes\" src=\"./.github/permissions.png\" width=\"450px\" /\u003e\n\n3. Open up Stacker options by clicking the extension icon at the right-top corner of your Chrome window. You'll notice that **access token** field for github.com domain is empty. Paste your token there and you're all set! Notice that you can also add more domains. This plugin also supports enterprise GitHub.\n\n\n---\n\n## So what are stacked pull requests?\n\nAs you start splitting your pull requests into smaller chunks, you come to notice that one PR's code is actually dependent on anothers, and you continue to work on top of the previous PR you made. This is completely fine, but the question now is whether you want to proceed with the *Upstream based pull request* and keep your second PR's \u003ca href=\"https://github.com/blog/2224-change-the-base-branch-of-a-pull-request\"\u003ebase\u003c/a\u003e as upstream (master/develop, usually the selected by default) or set it to be the branch your previous PR uses (this is what I shall call a *Parent based pull request*).\n\n\n## Common pull request workflows\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003ctd width=\"50%\" align=\"center\"\u003e\n        \u003cbr /\u003e\n        \u003cimg align=\"center\" src=\"./.github/based-pr.svg\" height=\"150\"\u003e\u003cbr /\u003e\n        \u003cbr /\u003e\n        \u003cp\u003e\n          \u003cstrong\u003e\n            Parent based pull request\n          \u003c/strong\u003e\n          \u003cbr /\u003e\n          PR's \u003ca href=\"https://github.com/blog/2224-change-the-base-branch-of-a-pull-request\"\u003ebase\u003c/a\u003e\n          is set to previous PR's branch\n        \u003c/p\u003e\n      \u003c/td\u003e\n      \u003ctd width=\"50%\" align=\"center\"\u003e\n        \u003cbr /\u003e\n        \u003cbr /\u003e\n        \u003cimg src=\"./.github/upstream-pr.svg\" height=\"150\"\u003e\n        \u003cbr /\u003e\n        \u003cbr /\u003e\n        \u003cp\u003e\n          \u003cstrong\u003e\n            Upstream based pull request\n          \u003c/strong\u003e\n          \u003cbr /\u003e\n          Keeps the base as upstream and shares the commit history with its parent.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\n        \u003cbr /\u003e\n        \u003cp align=\"center\"\u003e\n          \u003cimg alt=\"PR 2\" src=\"./.github/PR2.png\" height=\"11px\" /\u003e is a sequel to \u003cimg alt=\"PR 1\" src=\"./.github/PR1.png\" width=\"30px\" /\u003e.\u003cbr /\u003e For instance, in \u003cimg alt=\"PR 1\" src=\"./.github/PR1.png\" width=\"30px\" /\u003e you implement the tooling and boilerplate for localization and in the second one you add the localization itself.\n        \u003c/p\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003cp align=\"center\"\u003e\n          \u003cbr /\u003e\n          \u003cimg alt=\"PR 2\" src=\"./.github/PR2.png\" height=\"11px\" /\u003e\n          depends on the functionality proposed in\n          \u003cimg alt=\"PR 1\" src=\"./.github/PR1.png\" width=\"30px\" /\u003e, but the dependency doesn't go the other way.\u003cbr /\u003e\n          They can be published as 2 separate pieces of functionality.\n        \u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### Parent based pull request\n\n#### Pros\n\n**\u003cimg alt=\"PR 2\" src=\"./.github/PR2.png\" height=\"11px\" /\u003e is easily reviewable once the reviewer understands changes proposed in \u003cimg alt=\"PR 1\" src=\"./.github/PR1.png\" width=\"30px\" /\u003e**\n\n- The entire Github's PR view only shows changes made in \u003cimg alt=\"PR 2\" src=\"./.github/PR2.png\" height=\"11px\" /\u003e.\n- Reviewers are able to figure out which PR is a sequel to the PR they just reviewed. Adding **[PART 2]** type labels also makes this more prominent.\n\n#### Cons\n\n**The first PR (parent) can only move forward after all child PRs are reviewed and ready to be merged.**\n\n- \u003cimg alt=\"PR 1\" src=\"./.github/PR1.png\" height=\"11px\" /\u003e can't be merged to upstream before \u003cimg alt=\"PR 2\" src=\"./.github/PR2.png\" height=\"11px\" /\u003e is reviewed and merged to \u003cimg alt=\"PR 1\" src=\"./.github/PR1.png\" width=\"30px\" /\u003e.\n\n**\u003cimg alt=\"PR 2\" src=\"./.github/PR2.png\" height=\"11px\" /\u003e can accidentally be merged into a stale branch**\n\n- If \u003cimg alt=\"PR 1\" src=\"./.github/PR1.png\" width=\"30px\" /\u003e gets merged first, failing to update \u003cimg alt=\"PR 2\" src=\"./.github/PR2.png\" height=\"11px\" /\u003e's\nbase before merging will lead it to being merged to a stale branch.\n\n- ✨ This is when Stacker helps. It shows you a warning on the parent PR. For this initial release I've decided to just show a warning. Would disabling the merge button altogether be more useful? Create an issue if you have an opinion about this :).\n\n**Well, ok, it's quite bothersome to actually figure out the PR dependency tree**\n- ✨ Stacker actually fixes this with fancy labels on the PR titles, but more about that later on.\n\n### Upstream based pull request\n\n#### Pros\n\n**Parent PRs can now be merged even when the children aren't ready**\n\n- Obviously depends a bit of the PRs you decide to make. As a side note, I really wanna bring up this [great article about Feature Toggles](https://martinfowler.com/articles/feature-toggles.html) and how they can help you deploy your to production even when it's still a bit unpolished. There are also couple of other really inviting benefits this approach offers, but I'll let you read about them yourself.\n\n\n#### Cons\n\n**\u003cimg alt=\"PR 2\" src=\"./.github/PR2.png\" height=\"11px\" /\u003e includes changes from both PRs making it more difficult to review.**\n\n- ✨ Yup, you guessed it. Totally want to fix this and this was actually the main reason I started writing this extension. In this case the extension changes Github's default \"Files changed\" - view to show you only changes from the pull request you're reviewing. Sweet!\n\n\n**There's no easy way of seeing that \u003cimg alt=\"PR 2\" src=\"./.github/PR2.png\" height=\"11px\" /\u003e is a sequel for \u003cimg alt=\"PR 1\" src=\"./.github/PR1.png\" width=\"30px\" /\u003e**\n\n- ✨ Stacker's colored labels on Github's \"Pull requests\" - view should help a lot with this. On top of this, each label has a number that helps understanding in which orders the pull requests should be reviewed.\n\n**\u003cimg alt=\"PR 1\" src=\"./.github/PR1.png\" width=\"30px\" /\u003e can get merged accidentally if \u003cimg alt=\"PR 2\" src=\"./.github/PR2.png\" height=\"11px\" /\u003e is merged first**\n\n- ✨ This is where the warning is shown on the child PR's summary.\n\n\n---\n\n## Features\n\n### Mark pull request as dependent of your previous work\n\n|\u003cimg alt=\"Pull request order visible in pull requests\" src=\"./.github/list-view.png\" width=\"513px\" /\u003e | \u003cimg alt=\"Select parent pull request\" src=\"./.github/parent-selector.png\" width=\"320px\" /\u003e |\n|--|--|\n\n\n### Only see changes made in the PR you’re reviewing\n\n|\u003cimg  alt=\"Only relevant changes visible\" src=\"./.github/diff-view.png\" /\u003e|\n|--|\n\n\n### Automatic warnings of pull request dependencies\n\n|\u003cimg width=\"789px\" alt=\"Automatic warnings on child pull requests\" src=\"./.github/warning.png\" /\u003e|\n|--|\n\n---\n\n## Related work\n\n- [Stacked Pull Requests: Keeping GitHub Diffs Small](https://graysonkoonce.com/stacked-pull-requests-keeping-github-diffs-small/)\n\n- [#959 Mark pull request as depending on another](https://github.com/isaacs/github/issues/959)\n- [#950 Stacked Pull Requests](https://github.com/isaacs/github/issues/950)\n\n---\n\nThis project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).\n\n**Thanks for reading 🙂**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikukissa%2Fstacker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frikukissa%2Fstacker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikukissa%2Fstacker/lists"}