diff --git a/.github/ISSUE_TEMPLATE/add_profile.md b/.github/ISSUE_TEMPLATE/add_profile.md index 467ba99d..d1aae329 100644 --- a/.github/ISSUE_TEMPLATE/add_profile.md +++ b/.github/ISSUE_TEMPLATE/add_profile.md @@ -3,13 +3,27 @@ name: ➕ Add Profile about: Add your profile to our database ✨ title: "Add Profile: " labels: ➕ profile -category: String --- -paste a screenshot of your GitHub profile here +## Profile Submission -enter category to label your profile -category: +Please paste a screenshot of your GitHub profile here. -then comment ``@all-contributors please add @ for review`` +### Profile Category +Please select one or more categories for your profile: + +- [ ] Badge 🎖️ +- [ ] Minimalistic ✨ +- [ ] Dynamic 🔄 +- [ ] Icons 🎯 +- [ ] Backgrounds 😎 +- [ ] GIFS 🖼️ +- [ ] Game Mode 🚀 +- [ ] Code 👨‍💻 + +### Next Steps + +Once you've filled out the information, please comment below: + + ``@all-contributors please add @ for review`` diff --git a/.github/workflows/update-categories.yml b/.github/workflows/update-categories.yml new file mode 100644 index 00000000..a224e0ad --- /dev/null +++ b/.github/workflows/update-categories.yml @@ -0,0 +1,34 @@ +name: Update Categories on PR + +on: + pull_request: + types: [opened, synchronize] + +jobs: + update-categories: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.x' + + - name: Install Dependencies + run: npm install + + - name: Update Contributors File + run: node .github/workflows/update-contributors.js ${{ github.event.pull_request.user.login }} "${{ github.event.pull_request.body }}" + + - name: Commit and Push Changes + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add .all-contributorsrc + git commit -m "Update categories for ${{ github.event.pull_request.user.login }}" + git push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-contributors.js b/.github/workflows/update-contributors.js new file mode 100644 index 00000000..40ae307c --- /dev/null +++ b/.github/workflows/update-contributors.js @@ -0,0 +1,33 @@ +const fs = require('fs'); +const path = require('path'); + +const username = process.argv[2]; +const prBody = process.argv[3]; +const screenshotUrl = `https://raw.githubusercontent.com/nishant0708/awesome-github-profiles/main/screenshots/${username}.png`; + +// Extract selected categories from the PR body +const categories = (prBody.match(/\[(x| )\] (.+)/g) || []).map(line => line.replace(/^\[(x| )\] /, '')); + +const contributorsFilePath = path.join(process.cwd(), '.all-contributorsrc'); +const contributorsData = JSON.parse(fs.readFileSync(contributorsFilePath, 'utf8')); + +// Check if the user already exists in the contributors data +const existingContributor = contributorsData.contributors.find(contributor => contributor.login === username); + +if (existingContributor) { + // Update existing contributor's categories + existingContributor.contributions = categories; +} else { + // Add a new contributor + contributorsData.contributors.push({ + login: username, + name: username, // Customize as needed + avatar_url: `https://avatars.githubusercontent.com/${username}`, + ScreenShot: screenshotUrl, + profile: `https://github.com/${username}`, + contributions: categories + }); +} + +fs.writeFileSync(contributorsFilePath, JSON.stringify(contributorsData, null, 2)); +console.log('Contributors file updated successfully!'); diff --git a/githubbadge.html b/githubbadge.html index c4465d1a..336bb8f7 100644 --- a/githubbadge.html +++ b/githubbadge.html @@ -157,7 +157,7 @@ Github-Badge Events - Blog + Blog
-
Starstruck
+
Starstruck
Starstruck
@@ -479,12 +479,12 @@

👋 Achievement Skin Tone 👋

-
Skin Tone 1
-
Skin Tone 2
-
Skin Tone 3
-
Skin Tone 4
-
Skin Tone 5
-
Skin Tone 6
+
Skin Tone 1
+
Skin Tone 2
+
Skin Tone 3
+
Skin Tone 4
+
Skin Tone 5
+
Skin Tone 6
👋
@@ -499,7 +499,7 @@

👋 Achievement Skin Tone 👋

-
Quickdraw
+
Quickdraw
Quickdraw
@@ -513,12 +513,12 @@

👋 Achievement Skin Tone 👋

-
Quickdraw Skin Tone 1
-
Quickdraw Skin Tone 2
-
Quickdraw Skin Tone 3
-
Quickdraw Skin Tone 4
-
Quickdraw Skin Tone 5
-
Quickdraw Skin Tone 6
+
Quickdraw Skin Tone 1
+
Quickdraw Skin Tone 2
+
Quickdraw Skin Tone 3
+
Quickdraw Skin Tone 4
+
Quickdraw Skin Tone 5
+
Quickdraw Skin Tone 6
👋
@@ -551,40 +551,40 @@

✨ Highlights Badges ✨

- - Pro Light Mode + + Pro Light Mode Pro Use GitHub Pro - - Developer Program Member Light Mode + + Developer Program Member Light Mode Developer Program Member Be a registered member of the GitHub Developer Program - - Security Bug Bounty Hunter Light Mode + + Security Bug Bounty Hunter Light Mode Security Bug Bounty Hunter Helped out hunting down security vulnerabilities at GitHub Security - - GitHub Campus Expert Light Mode + + GitHub Campus Expert Light Mode GitHub Campus Expert Participate in the GitHub Campus Program - - Security Advisory Credit Light Mode + + Security Advisory Credit Light Mode Security advisory credit Have your security advisory submitted to the GitHub Advisory Database accepted @@ -603,7 +603,7 @@

❌ Badges no longer earnable ❌

- Mars 2020 Contributor + Mars 2020 Contributor Mars 2020 Contributor Contributed code to a repository used in the Mars 2020 Helicopter Mission @@ -615,7 +615,7 @@

❌ Badges no longer earnable ❌

- Mars 2020 Contributor Badge + Mars 2020 Contributor Badge 1 @@ -625,7 +625,7 @@

❌ Badges no longer earnable ❌

- Arctic Code Vault Contributor + Arctic Code Vault Contributor Arctic Code Vault Contributor Contributed code to a repository in the 2020 GitHub Archive Program @@ -637,7 +637,7 @@

❌ Badges no longer earnable ❌

- Arctic Code Vault Contributor Badge + Arctic Code Vault Contributor Badge 1 @@ -655,7 +655,7 @@

You can find more information about GitHub Badges under this - Pull Shark Animated + Pull Shark Animated