Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ Show off your profile with some interesting statistics. Perfect for profile READ
```md
[![GitHub WidgetBox](https://github-widgetbox.vercel.app/api/profile?username=Jurredr&data=followers,repositories,stars,commits)](https://github.com/Jurredr/github-widgetbox)
```

By default, `repositories` and `stars` only count repos owned directly by your personal account. Add `&includeOrgs=true` to also count public repositories (and their stars) from organizations you're a member of:

```md
[![GitHub WidgetBox](https://github-widgetbox.vercel.app/api/profile?username=Jurredr&data=followers,repositories,stars,commits&includeOrgs=true)](https://github.com/Jurredr/github-widgetbox)
```

This is opt-in so existing embeds keep their current numbers. It only sees organizations and repositories that are publicly visible, capped at the first 25 organizations and first 100 repositories per organization.
<br/><br/>
### Themes

Expand Down Expand Up @@ -110,7 +118,7 @@ nautilus | serika
* [x] Add Skills: Tools & Frameworks widget
* [x] Add Skills: Software & IDEs widget
* [ ] Make autobuilder instead of manual build and push
* [ ] Count organization repositories (+ their stars)
* [x] Count organization repositories (+ their stars)
* [ ] Truncate name if too long on profile widget
* [ ] Make all widgets a modular size
* [ ] Add Profile Tag widget
Expand Down
4 changes: 2 additions & 2 deletions api/routes/profile-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const githubUsernameRegex = require("github-username-regex")

// Primary profile route
router.get('/', function (req: Request, res: Response) {
const { username, data, theme } = req.query
const { username, data, theme, includeOrgs } = req.query

// Set the header's type to svg/xml
res.setHeader('Content-Type', 'image/svg+xml')
Expand Down Expand Up @@ -39,7 +39,7 @@ router.get('/', function (req: Request, res: Response) {
}

// Grab the Profile widget
profileWidget(String(username), String(data), String(theme)).then((response) => {
profileWidget(String(username), String(data), String(theme), String(includeOrgs)).then((response) => {
if (response === undefined || response === null) {
res.send(
errorWidget('Profile', '-25%', 'GitHub API-call error!', '-24%')
Expand Down
12 changes: 6 additions & 6 deletions public/api/routes/profile-route.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/api/routes/profile-route.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 21 additions & 4 deletions public/src/fetchers/user-stats-fetcher.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/src/fetchers/user-stats-fetcher.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions public/src/interfaces/Organizations.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/src/interfaces/Organizations.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 29 additions & 13 deletions public/src/widgets/profile.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading