Skip to content

Commit

Permalink
Merge branch 'main' into all-contributors/add-dinxsh
Browse files Browse the repository at this point in the history
  • Loading branch information
dinxsh authored Aug 1, 2024
2 parents ef9502a + cd51687 commit 79e92bd
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 40 deletions.
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@
"maintenance",
"review"
]
},
{
"login": "MastanSayyad",
"name": "Mastan Sayyad",
"avatar_url": "https://avatars.githubusercontent.com/u/101971980?v=4",
"profile": "https://github.com/MastanSayyad",
"contributions": [
"review"
]
},
{
"login": "sanjay-kv",
"name": "Sanjay Viswanathan",
"avatar_url": "https://avatars.githubusercontent.com/u/30715153?v=4",
"profile": "https://recodehive.com",
"contributions": [
"review"
]
}
],
"contributorsPerLine": 7,
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/add_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ paste a screenshot of your GitHub profile here
enter category to label your profile
category:

then comment ``@all-contributors please add @<username> for review``

33 changes: 0 additions & 33 deletions .github/workflows/add-contributor-on-issue.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/screenshot-on-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Capture GitHub Profile Screenshot

on:
issues:
types: [opened]

jobs:
capture-screenshot:
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: '14'

- name: Install Puppeteer
run: npm install puppeteer

- name: Capture Screenshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node capture-screenshot.js ${{ github.event.issue.user.login }}

- name: Upload Screenshot
uses: actions/upload-artifact@v3
with:
name: screenshot
path: screenshots/
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
<div align="center">

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
A list of awesome GitHub Profiles under one roof
</div>

# Add Your Profile
### add your profile [here](https://github.com/recodehive/awesome-github-profiles/issues/new?assignees=&labels=%E2%9E%95+profile&projects=&template=add_profile.md&title=Add+Profile%3A+)
</div>

1. create an issue [here](https://github.com/recodehive/awesome-github-profiles/issues)
2. comment ```@all-contributors please add @<username> for <contribution>```
- (refer [here](https://allcontributors.org/docs/en/emoji-key) for contribution types)

## Profiles ✨

Expand All @@ -23,6 +19,8 @@ A list of awesome GitHub Profiles under one roof
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://dinxsh.xyz"><img src="https://avatars.githubusercontent.com/u/90450035?v=4?s=100" width="100px;" alt="Dinesh Talwadker"/><br /><sub><b>Dinesh Talwadker</b></sub></a><br /><a href="https://github.com/recodehive/awesome-github-profiles/issues?q=author%3Adinxsh" title="Bug reports">🐛</a> <a href="#maintenance-dinxsh" title="Maintenance">🚧</a> <a href="https://github.com/recodehive/awesome-github-profiles/pulls?q=is%3Apr+reviewed-by%3Adinxsh" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MastanSayyad"><img src="https://avatars.githubusercontent.com/u/101971980?v=4?s=100" width="100px;" alt="Mastan Sayyad"/><br /><sub><b>Mastan Sayyad</b></sub></a><br /><a href="https://github.com/recodehive/awesome-github-profiles/pulls?q=is%3Apr+reviewed-by%3AMastanSayyad" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://recodehive.com"><img src="https://avatars.githubusercontent.com/u/30715153?v=4?s=100" width="100px;" alt="Sanjay Viswanathan"/><br /><sub><b>Sanjay Viswanathan</b></sub></a><br /><a href="https://github.com/recodehive/awesome-github-profiles/pulls?q=is%3Apr+reviewed-by%3Asanjay-kv" title="Reviewed Pull Requests">👀</a></td>
</tr>
</tbody>
</table>
Expand Down
34 changes: 34 additions & 0 deletions capture-screenshot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const puppeteer = require('puppeteer');
const fs = require('fs');
const path = require('path');

async function takeScreenshot(username) {
const url = `https://github.com/${username}`;
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto(url);

await page.setViewport({ width: 1280, height: 800 });
const screenshotPath = path.join('screenshots', `${username}.png`);
await page.screenshot({ path: screenshotPath, fullPage: true });

await browser.close();
return screenshotPath;
}

async function main() {
const username = process.argv[2];
if (!username) {
console.error('No username provided');
process.exit(1);
}

if (!fs.existsSync('screenshots')) {
fs.mkdirSync('screenshots');
}

const screenshotPath = await takeScreenshot(username);
console.log(`Screenshot taken for ${username}: ${screenshotPath}`);
}

main();
1 change: 1 addition & 0 deletions screenshots/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit 79e92bd

Please sign in to comment.