Skip to content

Commit e82a21c

Browse files
committed
update readme
1 parent 49530b6 commit e82a21c

1 file changed

Lines changed: 41 additions & 39 deletions

File tree

README.md

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,22 @@
44

55
# Contributors on Github
66

7-
The original idea was to show if it's a contributors first PR on the pull request page such as https://github.com/babel/babel/pull/3283.
7+
A browser extension that shows contributor information on GitHub pull requests, including whether it's a user's first contribution.
88

99
[![](firstpr.gif)](https://github.com/babel/babel/pull/3283)
1010

1111
Much thanks to @Pocket-titan and @djrosenbaum for working on the logo 🖼!
1212

13-
---
13+
## Features
1414

15-
## Install
15+
- [x] Shows the number of Issues/PRs a user has made to a specific repository, org, account
16+
- [x] ~~Displays "First-time contributor" badge for new contributors~~ GitHub does this now!
17+
- Works on any GitHub page with pull requests or issues
18+
- Data is cached for better performance
19+
20+
## Installation
21+
22+
### Browser Extension Stores
1623

1724
[link-chrome]: https://chrome.google.com/webstore/detail/github-contributor-stats/cjbacdldhllelehomkmlniifaojgaeph?hl=en 'Version published on Chrome Web Store'
1825
[link-firefox]: https://addons.mozilla.org/en-US/firefox/addon/contributor-on-github/ 'Version published on Mozilla Add-ons'
@@ -21,60 +28,55 @@ Much thanks to @Pocket-titan and @djrosenbaum for working on the logo 🖼!
2128

2229
[<img src="https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_128x128.png" width="48" alt="Firefox" valign="middle">][link-firefox] [<img valign="middle" src="https://img.shields.io/amo/v/contributor-on-github.svg?label=%20">][link-firefox]
2330

24-
---
25-
26-
## Usage
27-
28-
You can start from any page on `github.com` and when you navigate to a specific issue/pull request (such as https://github.com/babel/babel/pull/3331), it will inject information inline (like the # of PRs a user has made to that specific repo).
29-
30-
[![](injected-content.png)](https://github.com/jscs-dev/node-jscs/pull/2180)
31+
### Local Installation
3132

32-
You can click on `🔄` to update the data if it has changed (it is cached in chrome storage).
33+
#### Chrome/Edge/Brave/Opera
3334

34-
If necessary, you may want to create or get a "access token" that uses the `public_repo` permission if you want to use a 30/min rate limit instead of 10/min.
35+
1. Clone or [download](https://github.com/hzoo/contributors-on-github/archive/refs/heads/master.zip) this repository
36+
2. Go to `chrome://extensions/`
37+
3. Enable "Developer mode" in the top-right corner
38+
4. Click "Load unpacked"
39+
5. Select the `src` folder from this repository
3540

36-
> If you want to use this on private repos then you'll need to add the `repo` permission instead. I would recommend installing locally for this.
41+
#### Firefox
3742

38-
<img src="options.png" alt="options" height="300px">
43+
1. Clone or download this repository
44+
2. Go to `about:debugging#/runtime/this-firefox`
45+
3. Click "Load Temporary Add-on…"
46+
4. Select the `manifest.json` file in the `src` folder
3947

40-
---
48+
## Usage
4149

42-
## Permissions
50+
Once installed, the extension works automatically when you visit GitHub pull requests or issues. It injects contributor information inline, showing the number of PRs a user has made to that specific repository.
4351

44-
- "https://github.com/*/*": to be able to inject data into github
45-
- The [content script](src/content.js) was matching `"https://github.com/*/*/pull/*` which is correct, but if you start from the hompage, then the script won't ever be injected since github is using pushState to change urls. Now it will match `https://github.com` and then check for the specific url.
46-
- "https://api.github.com/*": to fetch issue/pr data
47-
- `"storage"`, to store access token, cache user PR data.
48-
49-
---
52+
[![](injected-content.png)](https://github.com/jscs-dev/node-jscs/pull/2180)
5053

51-
## Local Install (Chrome)
54+
You can click on `🔄` to refresh the data if needed (data is cached in browser storage).
5255

53-
- Download the zip, and unzip it
56+
### GitHub API Rate Limits
5457

55-
<img src="load-extension.png" alt="local install instructions" height="150px">
58+
- Without authentication: 60 requests per hour
59+
- With authentication token: 5,000 requests per hour
5660

57-
- Go to [`chrome://extensions/`](chrome://extensions/)
58-
- Click on `Load unpacked extension...`
59-
- Select the `src` folder of the unzipped folder you downloaded
61+
To use higher rate limits, you can add a GitHub personal access token in the extension options:
6062

61-
Now try it out!
63+
1. Create a token at [GitHub Settings > Developer settings > Personal access tokens](https://github.com/settings/tokens)
64+
2. For public repositories: Select the `public_repo` permission
65+
3. For private repositories: Select the `repo` permission
66+
4. Copy the token and paste it in the extension options
6267

63-
## Local Install (Firefox)
68+
<img src="options.png" alt="options" height="300px">
6469

65-
- Go to [`about:debugging#/runtime/this-firefox`](about:debugging#/runtime/this-firefox)
66-
- Click on `Load Temporary Add-on…`
67-
- Select the `manifest.json` file in the `src` folder you downloaded
68-
- You're done! It should also show up in `about:addons`
70+
## Permissions
6971

70-
---
72+
- `github.com/*/*`: Allows the extension to inject data into GitHub pages
73+
- `api.github.com/*`: Needed to fetch issue/PR data from GitHub's API
74+
- `storage`: Stores your access token and caches user PR data
7175

72-
## Related
76+
## Related Projects
7377

7478
- [Awesome browser extensions for GitHub](https://github.com/stefanbuck/awesome-browser-extensions-for-github)
75-
- [Refined GitHub](https://github.com/sindresorhus/refined-github/) - OG github extension
76-
77-
---
79+
- [Refined GitHub](https://github.com/sindresorhus/refined-github/)
7880

7981
## License
8082

0 commit comments

Comments
 (0)