{"id":17950908,"url":"https://github.com/jonathanpeppers/inclusive-code-reviews-browser","last_synced_at":"2025-10-23T17:45:58.028Z","repository":{"id":38792879,"uuid":"380282994","full_name":"jonathanpeppers/inclusive-code-reviews-browser","owner":"jonathanpeppers","description":"A chrome web extension for improving code reviews on Github or Azure DevOps","archived":false,"fork":false,"pushed_at":"2024-10-28T01:11:34.000Z","size":19748,"stargazers_count":32,"open_issues_count":26,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-29T10:17:36.054Z","etag":null,"topics":["azure-devops","chrome-extension","code-review","github","hacktoberfest","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanpeppers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-25T15:38:14.000Z","updated_at":"2024-10-28T01:11:35.000Z","dependencies_parsed_at":"2023-02-15T02:01:39.959Z","dependency_job_id":"c7a99998-4615-4181-90b2-77303adccbc6","html_url":"https://github.com/jonathanpeppers/inclusive-code-reviews-browser","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpeppers%2Finclusive-code-reviews-browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpeppers%2Finclusive-code-reviews-browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpeppers%2Finclusive-code-reviews-browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpeppers%2Finclusive-code-reviews-browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanpeppers","download_url":"https://codeload.github.com/jonathanpeppers/inclusive-code-reviews-browser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245377919,"owners_count":20605374,"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":["azure-devops","chrome-extension","code-review","github","hacktoberfest","machine-learning"],"created_at":"2024-10-29T09:41:03.327Z","updated_at":"2025-10-23T17:45:52.998Z","avatar_url":"https://github.com/jonathanpeppers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inclusive Code Reviews: Browser Extension\n\nA *prototype* Chrome and Edge web extension for improving online comments such\nas code reviews on Github or Azure DevOps. The idea is that the\nextension would make suggestions *before* you post a comment. This\ngives developers a chance to think about their phrasing and reword the\ncomment.\n\n![popup](docs/popup.png)\n\nFor example, you might use the term \"whitelist\" in a code review on\nAzure DevOps:\n\n![negative word](docs/negative-word.png)\n\nThe word \"allowlist\" might be better (and more inclusive) terminology:\n\n![negative word fixed](docs/negative-word-fixed.png)\n\nWe welcome changes to [suggestions.js](src-packed/suggestions.js), if\nyou know other words and terminology we can suggest. Please send a PR!\n\n## Sentiment Analysis\n\nIn addition to checking commonly-used words, your comments are\nclassified by [our custom machine learning model][model]. We are\nhoping to get a somewhat accurate model that is OK with \"there was a\ntest failure\", but not OK with \"you are a failure\". Standard sentiment\nanalysis wasn't good enough for our usage.\n\nNote that the model runs *inside* the browser extension, and your actual text is\nnot ever sent across the Internet (see [OpenAI below](#openai) for one exception\nto this). Some anonymous telemetry is collected for general usage of the\nextension, see [telemetry.md](docs/telemetry.md) for details.\n\nFor example, you might make a comment on a Github pull request. Seems\nOK, right? Is it a \"mean\" comment?\n\n![negative sentiment](docs/negative-sentiment.png)\n\nWe could certainly reword this be be better -- more inclusive and\ngenerally friendlier:\n\n![negative sentiment fixed](docs/negative-sentiment-fixed.png)\n\n[model]: https://github.com/jonathanpeppers/inclusive-code-reviews-ml\n\n## OpenAI\n\nThere is now a feature to query OpenAI available in version 3.1 or higher of the\nbrowser extension.\n\nThis enables suggestions to phrases we have identified as negative sentiment:\n\n![Ask an AI for Suggestions](docs/openaifirst.png)\n\n![Alternate suggestions to \"This code is terribly inefficient\"](docs/openai.png)\n\nUsers will have control of which text is sent over the Internet, by clicking the\nbutton (or not!).\n\n## Contributing\n\nThis is built using the `extension-cli` module:\n\nhttps://www.npmjs.com/package/extension-cli\n\nTo setup your API key, create a `src-packed/secrets.js` file with:\n\n    export const api_key = \"\u003cput the real key here\u003e\";\n    export const appinsights_key = \"\u003cput the app insights connection string here\u003e\";\n\n_NOTE: you can also just use empty string values `\"\"`, if you want to\ncontribute without API keys. This *should* work fine for the latest\nversion of the extension._\n\nMake sure you have a recent version of `node.js`, you can [install\nhere](https://nodejs.org/en/download/current/).\n\nTo build:\n\n    npm install\n    npx xt-build\n\nIf the build fails with an error like this:\n\n    Error: Cannot find module 'webpack/lib/ProgressPlugin'\n\nthen do this:\n\n    npm i webpack\n\nTo run tests:\n\n    npx xt-test\n\nIf you don't want to build the extension from source, you can also\ndownload build artifacts from Github actions:\n\n![artifacts](docs/artifacts.png)\n\nTo install in Edge:\n\n1. Navigate to `edge://extensions/`\n1. Enable the `Developer Mode` toggle in the bottom left\n1. Drag the `release.zip` file produced by the build into Edge.\n\nInstructions should be similar for Google Chrome.\n\n## Development Tips\n\nYou can use the debugging menu in VS Code to run tests:\n\n![VS Code breakpoint](docs/debugging-tests.png)\n\nThis allows breakpoints to work, as well as looking at the value of current variables.\n\nIf the build fails with:\n\n```\nnpx xt-build\nError: Cannot find module 'webpack/lib/ProgressPlugin'\nRequire stack:\n- ~/src/inclusive-code-comments/node_modules/webpack-stream/index.js\n- ~/src/inclusive-code-comments/node_modules/extension-cli/cli/gulpfile.js\n- ~/src/inclusive-code-comments/node_modules/gulp-cli/lib/shared/require-or-import.js\n- ~/src/inclusive-code-comments/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js\n- ~/src/inclusive-code-comments/node_modules/gulp-cli/index.js\n- ~/src/inclusive-code-comments/node_modules/gulp/bin/gulp.js\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)\n    at Function.Module._load (internal/modules/cjs/loader.js:899:27)\n    at Module.require (internal/modules/cjs/loader.js:1090:19)\n    at require (internal/modules/cjs/helpers.js:75:18)\n    at Object.\u003canonymous\u003e (~/src/inclusive-code-comments/node_modules/webpack-stream/index.js:10:24)\n    at Module._compile (internal/modules/cjs/loader.js:1201:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)\n    at Module.load (internal/modules/cjs/loader.js:1050:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:938:14)\n    at Module.require (internal/modules/cjs/loader.js:1090:19) {\n  code: 'MODULE_NOT_FOUND',\n  requireStack: [\n    '~/src/inclusive-code-comments/node_modules/webpack-stream/index.js',\n    '~/src/inclusive-code-comments/node_modules/extension-cli/cli/gulpfile.js',\n    '~/src/inclusive-code-comments/node_modules/gulp-cli/lib/shared/require-or-import.js',\n    '~/src/inclusive-code-comments/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js',\n    '~/src/inclusive-code-comments/node_modules/gulp-cli/index.js',\n    '~/src/inclusive-code-comments/node_modules/gulp/bin/gulp.js'\n  ]\n}\nBuild failed\n```\n\nYou might need to update `node.js`. `node -v` should report node 16 or higher.\n`brew upgrade node` (homebrew) is one way to update this on macOS.\n\n## Links \u0026 Docs\n\nInclusive Code Reviews Group links\n\n* [Beta Test Instructions](https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/27882/Browser-Extension?anchor=beta-test)\n* [Azure DevOps dashboard](https://dataexplorer.azure.com/dashboards/a8390f81-19c6-4bf5-bbd6-1a84cf03d80c?_startTime=30days\u0026_endTime=now#a32efffa-608f-4ad9-b685-4b414b5c305b): has a few queries for looking at telemetry.\n\nExtension CLI\n\n* https://www.npmjs.com/package/extension-cli\n\nInclusive Code Reviews ML\n\n* https://github.com/jonathanpeppers/inclusive-code-reviews-ml\n\n## Attribution\n\nThis is a prototype based on:\n\n* https://languagetool.org/\n* [Chrome Extension](https://chrome.google.com/webstore/detail/grammar-and-spell-checker/oldceeleldhonbafppcapldpdifcinji)\n* [Github Repo](https://github.com/languagetool-org/languagetool)\n* See [LICENSE](LICENSE) for original GPL license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanpeppers%2Finclusive-code-reviews-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanpeppers%2Finclusive-code-reviews-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanpeppers%2Finclusive-code-reviews-browser/lists"}