{"id":20438172,"url":"https://github.com/kiprasmel/refined-gitlab","last_synced_at":"2025-07-16T10:35:59.964Z","repository":{"id":97544577,"uuid":"286331779","full_name":"kiprasmel/refined-gitlab","owner":"kiprasmel","description":"🏷 Make your GitLab experience better! read-only mirror from https://gitlab.com/kiprasmel/refined-gitlab","archived":false,"fork":false,"pushed_at":"2024-02-23T21:29:49.000Z","size":636,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T22:34:02.675Z","etag":null,"topics":["extension","git","gitlab","mirror","refined","refined-gitlab"],"latest_commit_sha":null,"homepage":"https://gitlab.com/kiprasmel/refined-gitlab","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/kiprasmel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2020-08-09T23:10:31.000Z","updated_at":"2024-02-18T20:57:24.000Z","dependencies_parsed_at":"2025-04-12T22:39:50.339Z","dependency_job_id":null,"html_url":"https://github.com/kiprasmel/refined-gitlab","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/kiprasmel/refined-gitlab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiprasmel%2Frefined-gitlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiprasmel%2Frefined-gitlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiprasmel%2Frefined-gitlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiprasmel%2Frefined-gitlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiprasmel","download_url":"https://codeload.github.com/kiprasmel/refined-gitlab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiprasmel%2Frefined-gitlab/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262520205,"owners_count":23323651,"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":["extension","git","gitlab","mirror","refined","refined-gitlab"],"created_at":"2024-11-15T09:09:41.966Z","updated_at":"2025-06-29T01:36:48.735Z","avatar_url":"https://github.com/kiprasmel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# refined-gitlab\n\nMuch like [refined-github](https://github.com/sindresorhus/refined-github), but for gitlab!\n\n## Install\n\n\n- [**Chrome** extension \u003cimg valign=\"middle\" src=\"https://img.shields.io/chrome-web-store/v/jaafoplpaafgeeclnaakkimfgajikgba.svg?label=%20\"\u003e](https://chrome.google.com/webstore/detail/refined-gitlab/jaafoplpaafgeeclnaakkimfgajikgba/)\n\n- [**Firefox** add-on \u003cimg valign=\"middle\" src=\"https://img.shields.io/amo/v/refined-gitlab.svg?label=%20\"\u003e](https://addons.mozilla.org/en-US/firefox/addon/refined-gitlab/)\n\n### Verify integrity\n\nworks for versions \u003e= 0.9.1\n\n```sh\nPATH_TO_XPI=\"$HOME/Library/Application Support/Firefox/Profiles/\u003cYOUR_PROFILE\u003e/extensions/refined-gitlab@kipras.org.xpi\"\nVERSION=\"0.9.0\"\n./verify.sh \"$PATH_TO_XPI\" \"$VERSION\"\n```\n\n## Try it from a local build\n\nNote - downloading a `.zip` won't work - do exactly as described below (you'll need `git` and `yarn`).\n\nInside your terminal:\n\n```sh\ngit clone https://github.com/kiprasmel/refined-gitlab.git\n# or:  git clone git@github.com:kiprasmel/refined-gitlab.git\n\ncd refined-gitlab/\n\nyarn install\n```\n\n\u003e wait a bit. This will install the dependencies \u0026 clone git submodules\n\nSome features need the API. Either\n\na) be logged-in to gitlab, or\n\nb) provider a custom API token - inside [./source/utils/config.ts](./source/utils/config.ts) add your gitlab's `host URL` \u0026 `API token` (found at `\u003cgitlab_host\u003e/profile/personal_access_tokens`) with scopes `api` \u0026 `read_api`);\n\nthen:\n\n```sh\nyarn build # you need to do this every time you update something inside this repository\n```\n\nAnd then load up the built extension:\n\n### chrome:\n\nnavigate to\n\n```\nchrome://extensions\n```\n\n1. enable \"Developer mode\" (toggle @ top right)\n1. click \"Load unpacked\" (top left)\n1. navigate to the path where you cloned the repository at first step\n1. navigate to the `distribution/` folder \u0026 click \"Select\"\n\ndone! Note that after shutting down the browser, you'll need to load the extension from the `distribution/` folder again (begin @ [#chrome](#ii.1-chrome))\n\n### firefox:\n\nnavigate to\n\n```\nabout:debugging#/runtime/this-firefox\n```\n\n1. click \"Load Temporary Add-on...\"\n1. navigate to the path where you cloned the repository at first step\n1. navigate to the `distribution/` folder\n1. select any file \u0026 double-click it\n\ndone! Note that after shutting down the browser, you'll need to load the extension from the `distribution/` folder again (begin @ [#firefox](#ii.2-firefox))\n\n## Contributing\n\nHere is a short overview to get your familiar with how the project works.\n\nIn essence, this extension isn't that different from a regular react application 🤷‍♀️ (except it isn't as complex ☠️☠️)\n\nWe use `react` to render components and handle state logic (hooks included!).\n\nThe `source/` directory contains a few core folders - react's `components/`, the extension's `features/`, their `styles/`,  `utils/` and other necessary files.\n\nThere are also the `background-scripts/` and `content-scripts/` directories - they hold \u0026 import their respective scripts, which are later loaded by the browser, as defined in the `manifest.json` file (which is essential to web extensions - that's where you configure stuff (though you'll rarely touch it, if so)).\n\nThe extension is compiled via webpack into an IIFE, ready for browsers to execute. It's source is imported in [source/scripts-content/refined-gitlab.ts](source/scripts-content/refined-gitlab.ts) and loaded inside [source/utils/globalInit.ts](source/utils/globalInit.ts), where all features get loaded by [source/Features.ts](source/Features.ts). The features end up there by adding themselves into the `Features` array, where, once loaded, get their necessary data and render the resulting JSX.\n\nWe'll provide some examples soon™️. For now - feel free to explore the source, especially `features/`, `components/` and `utils/`\n\n\u003c!--\nTODO - introduce the gitlab API, gitbeaker etc. before showing an example feature\n--\u003e\n\n\u003c!--\nTODO - provide an example feature\n\nAn example feature, which would, let's say, show the total number of commits you've made, could look like this:\n\n```tsx\n// source/features/show-total-commit-count.tsx\n\nimport React, { useState, useEffect } from \"react\";\n\nimport { Feature, features } from \"../Features\";\nimport { api } from \"../utils/api\";\nimport { renderNextTo } from \"../utils/renderNextTo\";\n\nexport const showTotalCommitCount: Feature = (config) =\u003e {\n\n\tconst reactComponent = () =\u003e {\n\t\tconst [commitCount, setCommitCount] = useState\u003cnumber\u003e(0);\n\n\t\tuseEffect(() =\u003e {\n\n\n\t\t}, [])\n\n\t\treturn (\u003c\u003e\n\n\t\t\u003c/\u003e)\n\t}\n\n\tconst nodeId = \"total-commits\";\n\tconst additionalClassesForTopLevelElement = [];\n\n\t/** TODO simplify the `renderNextTo` util so that we don't need all of this lmao */\n\trenderNextTo(\".contrib-calendar\", nodeId, additionalClassesForTopLevelElement, reactComponent)\n}\n\nfeatures.add({\n\tid: \"show-total-commit-count\",\n\tfeature: changeBackgroundColor,\n\t**waitForDom**Loaded: true,\n});\n\n``` --\u003e\n\n## Permission explanations\n\nPermissions can be seen in [./source/manifest.json](./source/manifest.json)\n\n- `cookies`: required for 0-config authentication (the other option is an API token, but that's for power users who want to customize it that way).\n\n- `tabs`: required to retrieve the current tab and send over the cookie from the background to content script (see [./source/scripts-background/gitlab-session-cookie-sync.ts](./source/scripts-background/gitlab-session-cookie-sync.ts))\n- `\u003call_urls\u003e`: required since you have your own self-hosted gitlab instance and the `gitlab.com` url won't work\n\n## Auto authentication\n\nIt works like magic -- both for local development (auto sign-in by borrowing your session from another browser), and for production (0-config API auth - just be signed in to GitLab, and all features that require the API will work automatically).\n\n## Meta\n\n- [refined-gitlab](https://gitlab.com/kiprasmel/refined-gitlab) project ID on gitlab: `20434942`\n\n- [refined-gitlab-playground](https://gitlab.com/kiprasmel/refined-gitlab-playground) project ID on gitlab: `20690630`\n\n\n## See also\n\n- [Gitbeaker](https://github.com/jdalrymple/gitbeaker/) - GitLab's API wrapper we use here \u0026 often contribute to.\n- [Figma assets](https://www.figma.com/file/PyOJIJOClNV2dZs4QWU7Pa/Refined-GitLab) - icons, feature screenshots etc.\n\n## License\n\nMIT © [Kipras Melnikovas](https://gitlab.com/kiprasmel)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiprasmel%2Frefined-gitlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiprasmel%2Frefined-gitlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiprasmel%2Frefined-gitlab/lists"}