diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 88940b3..0000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -github-usernames.user-script.js \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 8d830e6..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Deploy - -on: - push: - -jobs: - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Setup Node - uses: actions/setup-node@v3 - - - name: Install dependencies - uses: bahmutov/npm-install@v1 - - - name: Build project - run: npm run build - - - name: Zip artifact - uses: montudor/action-zip@v1 - with: - args: zip -qq -r release.zip dist - - - name: Upload zip with production-ready files - uses: actions/upload-artifact@v4 - with: - name: production-files - path: ./release.zip - - test: - name: Deploy - needs: build - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - - steps: - - name: Download production-ready files - uses: actions/download-artifact@v4 - with: - name: production-files - - - name: Unzip artifact - uses: montudor/action-zip@v1 - with: - args: unzip -qq release.zip - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml deleted file mode 100644 index b96c723..0000000 --- a/.github/workflows/lint-test.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Test - lint - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - run: npm ci - - run: npm run lint diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml deleted file mode 100644 index b9f9421..0000000 --- a/.github/workflows/unit-test.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Test - unit tests - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - run: npm ci - - run: npm test diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8b7e502..0000000 --- a/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -lerna-debug.log* - -node_modules -dist -dist-ssr -*.local - -# Editor directories and files -.idea -.DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 19fdc18..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "workbench.colorCustomizations": { - "activityBar.activeBackground": "#fff4da", - "activityBar.background": "#fff4da", - "activityBar.foreground": "#15202b", - "activityBar.inactiveForeground": "#15202b99", - "activityBarBadge.background": "#00bf86", - "activityBarBadge.foreground": "#e7e7e7", - "commandCenter.border": "#15202b99", - "sash.hoverBorder": "#fff4da", - "statusBar.background": "#ffe5a7", - "statusBar.foreground": "#15202b", - "statusBarItem.hoverBackground": "#ffd674", - "statusBarItem.remoteBackground": "#ffe5a7", - "statusBarItem.remoteForeground": "#15202b", - "titleBar.activeBackground": "#ffe5a7", - "titleBar.activeForeground": "#15202b", - "titleBar.inactiveBackground": "#ffe5a799", - "titleBar.inactiveForeground": "#15202b99" - }, - "peacock.color": "#ffe5a7" -} \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 389d1ff..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Szymon Tondowski - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 7b6a41a..0000000 --- a/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# User profile names instead of usernames on GitHub - -## Why? - -In many organizations with company user accounts, the username is not easily associated with actual people. Instead of `@JimHelper` 🙂 and `@MichaelScott` 😅, you see `@dundermifflin_302512` 🤖 and `@dundermifflin_302513` 🤖 in pull requests and comments, which makes communication harder. - -Example: -https://github.com/orgs/community/discussions/61959 - -### The solution - -The script available here swaps usernames with preferred names from profiles ex. Jim Helper, Jim H. (if available). It allows you to set custom names for picked users and limit these options only to users with specific patterns in their usernames. For instance limit to `dundermifflin` would swap names only for this organization. - -## Installation - -1. Install https://www.tampermonkey.net/ - It is a very popular browser extension that allows you to add custom scripts to selected domains. - -- In our case, you will add a script to github.com. -- You can check the code if you are worried about security: it doesn't touch tokens at all. -- Manifest3 requires enabling development mode (as described on the page). Alternatively, you can use the Manifest2 version, which will work faster (M3 only trusts extensions with predefined scripts, but TM by design, allows any type of scripts to be added) - -2. Go to https://deykun.github.io/github-usernames/github-usernames.user.js - - - -### Saving users names - -To add user data, hover over their username and wait for the card (script grabs the username from the visible card). **But,** that sounds like a lot of work! Right, go to your organization's people page, and it will read 30 users at once from there. :) - -To edit a user's display name, go to their profile page. You will have an additional option there. diff --git a/assets/index-BLmGfr_b.js b/assets/index-BLmGfr_b.js new file mode 100644 index 0000000..cb8400b --- /dev/null +++ b/assets/index-BLmGfr_b.js @@ -0,0 +1,5 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}})();document.querySelector("#app").innerHTML=` +