{"id":28535594,"url":"https://github.com/gerritcodereview/gerrit-fe-dev-helper","last_synced_at":"2025-07-03T04:30:38.999Z","repository":{"id":84111642,"uuid":"221339052","full_name":"GerritCodeReview/gerrit-fe-dev-helper","owner":"GerritCodeReview","description":"null  - (mirror of https://gerrit.googlesource.com/./gerrit-fe-dev-helper)","archived":false,"fork":false,"pushed_at":"2025-05-18T03:48:55.000Z","size":934,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-09T17:16:57.565Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gerrit.googlesource.com/./gerrit-fe-dev-helper","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GerritCodeReview.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-11-13T00:31:18.000Z","updated_at":"2022-05-23T07:51:52.000Z","dependencies_parsed_at":"2023-12-14T13:27:48.569Z","dependency_job_id":"0d9fbc90-9418-4488-ad9c-0e64828bedbe","html_url":"https://github.com/GerritCodeReview/gerrit-fe-dev-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GerritCodeReview/gerrit-fe-dev-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GerritCodeReview%2Fgerrit-fe-dev-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GerritCodeReview%2Fgerrit-fe-dev-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GerritCodeReview%2Fgerrit-fe-dev-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GerritCodeReview%2Fgerrit-fe-dev-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GerritCodeReview","download_url":"https://codeload.github.com/GerritCodeReview/gerrit-fe-dev-helper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GerritCodeReview%2Fgerrit-fe-dev-helper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263258541,"owners_count":23438666,"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":[],"created_at":"2025-06-09T17:15:59.726Z","updated_at":"2025-07-03T04:30:38.970Z","avatar_url":"https://github.com/GerritCodeReview.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Gerrit FE Dev Helper\n\nGerrit FE Dev helper is a Chrome extension that will focus on helping frontend developers on Gerrit development.\n\nAs mentioned in [readme from polygerrit-ui](https://gerrit.googlesource.com/gerrit/+/refs/heads/master/polygerrit-ui/),\nwe already support to start your local host for developing / debugging / testing, but it has quite a few restrictions:\n\n1. No auth support\n2. Restart needed to switch hosts\n3. Not easy to test plugins\n\nTo solve these pain points, Tao Zhou created this Chrome extension. It proxies all assets requests or any requests to a local HTTP server, and has the ability to inject any plugins exposed by the local HTTP server.\n\n### Features\n\nSee in [release notes](./release-notes.md) and [Features](#Features) below.\n\n### Install\n\nThe easiest is to install from the [Chrome web store](https://chrome.google.com/webstore/category/extensions) here: https://chrome.google.com/webstore/detail/gerrit-fe-dev-helper/jimgomcnodkialnpmienbomamgomglkd.\n\nAfter you have installed and enabled the extension, you should see something similar to [demo.png](./demo.png).\n\n### BUILD\n\nTo build from source:\n\n```\nnpm install\nnpm run build\n```\n\nThen you should have `gerrit_fe_dev_helper.zip` that you can test with.\n\n### How to use\n\n1. For Gerrit core development, start the local Gerrit dev server to host app code locally\n\n```sh\nyarn start\n```\n\nOr if you are developing a plugin, serve your plugin via a local HTTP server via any means.\n\nExample:\n\n```sh\nnpx http-server -c-1 --cors\n```\n\n2. Go to any Gerrit sites, enable the extension by clicking the icon\n3. You should see a red notice show up in the bottom right of the page: `Gerrit dev helper is enabled`, and now your Gerrit assets should be loaded from your local HTTP server\n4. Change files locally and refresh the page, you should have the changes immediately\n\nThe extension comes with a set of [default rules](./data/rules.json),\nbut you can change the rules by clicking the extension icon again.\n\nThe extension supports different type of rules:\n\n1. block: block a certain request\n2. redirect: redirect a url to another url\n3. injectHtmlCode: inject a piece of html code to the page\n4. addReqHeader: to add arbitrary header when you send a request\n5. addRespHeader: to add arbitrary header when you receive a request\n6. rRespHeader: to remove arbitrary header on any response\n\n#### How to use dev helper with js plugins\n\nFor existing plugins just `redirect` from the where the plugin is normally loaded from to\n`http://localhost:8081/plugins/my-plugin.js` and put your local plugin file into the\n`polygerrit-ui/app/plugins` folder.\n\nFor new plugins you also have to use a `redirect` rule, because the Chrome extension is not allowed\nto inject JavaScript from arbitrary source by Content Security Policy. The easiest option is to\npick the most simple or irrelevant plugin that your Gerrit server has, and redirect from that.\n\n### Testing a new version\n\n- Execute `npm run build`.\n- Go to chrome://extensions/.\n- Turn on `Developer Mode`.\n- Click `Load Unpacked`.\n- Choose the `dist` directory.\n\nAs a Google developer you will have to add a `key` to the `manifest.json` in the `dist/` directory\nas documented here: http://go/extension-identification#i%E2%80%99m-developing-a-chrome-extension-on-my-computer\n\n### Publish a new version to the Chrome Webstore\n\nThis section is for members of Google's developer team only.\n\n- Make sure that you are a member of the group g/gerrit-fe-dev-helper.\n- Go to https://chrome.google.com/webstore/devconsole/d2ee4af0-3e6f-489c-97c9-fa14d84e2ffa/jimgomcnodkialnpmienbomamgomglkd/edit/package\n- Make sure that you have updated the version in `manifest.json` and `package.json`.\n- Produce a zip bundle of the extension by executing `npm run build`.\n- Upload the bundle using the `Upload dogfood version` button.\n- Submit the dogfood draft for review.\n- Wait ~24h for the dogfood draft to be published.\n- Upload the bundle using the `Upload new package` button.\n- Submit the main draft for review.\n- Wait ~24h for the main draft to be published.\n\n### Contact\n\nPlease don't hesitate to contact dhruvsri@google.com for support on this extension.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgerritcodereview%2Fgerrit-fe-dev-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgerritcodereview%2Fgerrit-fe-dev-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgerritcodereview%2Fgerrit-fe-dev-helper/lists"}