Skip to content

Commit 68ddcc6

Browse files
committed
Tweak and elaborate on language names
Closes #94. Closes #137.
1 parent b39d7e4 commit 68ddcc6

1 file changed

Lines changed: 21 additions & 11 deletions

File tree

README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,21 @@ would be unable to access.
4747

4848
The GitHub statistics API returns inaccurate results in some situations:
4949

50-
- Total lines of code modified may be inflated – GitHub counts changes to files
51-
like `package-lock.json` that may impact the line count in surprising ways
50+
- Total lines of code modified may be too high or too low
51+
- GitHub counts changes to files like `package-lock.json` that may inflate the
52+
line count in surprising ways
5253
- On the other hand, GitHub refuses to count lines of code for repositories
5354
with more than 10,000 commits, so contributions to those will not be
5455
reflected in the data at all
5556
- [The GitHub API endpoint for computing contributor statistics no longer
5657
works reliably](https://github.com/orgs/community/discussions/192970), so we
57-
compute the statistics ourselves by cloning each repository locally and
58-
tallying lines changed with the `git` CLI
58+
fall back on computing the statistics ourselves by cloning each repository
59+
locally and tallying lines changed with the `git` CLI
5960
- Our computed totals likely under-count relative to GitHub's, since theirs
6061
correctly attribute authorship for contributions to pull requests with
6162
several authors that end up squashed and merged by just one author
63+
- They also correctly attribute commits we may miss if they are made with
64+
old email addresses no longer connected to the account
6265
- Repository view count statistics often seem too low, and many referring sites
6366
are not captured
6467
- If you lack permissions to access the view count for a repository, it will
@@ -84,8 +87,8 @@ and retrieve the images.
8487
and `repo`
8588
permissions.](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
8689
1. [Navigate to the personal access tokens (classic)
87-
page.](https://github.com/settings/tokens) Open that link in a new tab,
88-
or proceed with the steps below.
90+
page.](https://github.com/settings/tokens) Open that link in a new tab, or
91+
proceed with the steps below.
8992
1. Click your avatar in the top right corner, then "Settings" on the menu
9093
that drops down.
9194
1. Click "Developer settings" from the menu on the left.
@@ -105,17 +108,17 @@ and retrieve the images.
105108
1. **Copy the token and save it somewhere.** If you lose it, you will not be
106109
able to access it again, and will have to regenerate a new one. I keep
107110
mine saved along with the GitHub entry in my password manager.
108-
1. Some users report that it can take some time for the personal access
109-
token to take effect. For more information, see
111+
1. Some users report that it can take some time for the personal access token
112+
to take effect. For more information, see
110113
[#30](https://github.com/jstrieb/github-stats/issues/30).
111114
1. Create a copy of this repository by clicking
112115
[here](https://github.com/jstrieb/github-stats/generate).
113116
- Equivalently, click the big, green "Use this template" button at the top
114117
left of the page, then click "Create a new repository."
115118
- Note: this is **not** the same as forking a copy because it copies
116119
everything fresh, without the huge commit history.
117-
1. Create a new repository secret named `ACCESS_TOKEN` with your personal
118-
access token from the first step.
120+
1. Create a new repository secret named `ACCESS_TOKEN` with your personal access
121+
token from the first step.
119122
1. [Go to the "New secret" page for your copy of this repository by clicking
120123
this link.](../../settings/secrets/actions/new)
121124
- If the link doesn't work, try clicking it from your copy of this
@@ -132,10 +135,17 @@ and retrieve the images.
132135
1. (Optional) Make other secrets for more configuration.
133136
- To exclude some repositories from the aggregate statistics, add them
134137
(separated by commas) to a secret called `EXCLUDE_REPOS`.
138+
- To prevent your copy of this repository from showing up in your
139+
statistics, add the name of your copy of the repo to this list.
135140
- To exclude some languages from the aggregate statistics, add them
136141
(separated by commas) to a secret called `EXCLUDE_LANGS`.
142+
- The languages are case insensitive, and can include spaces.
143+
- Language names can be found either in a [local stats file generated by
144+
the CLI](#list-languages), or in the [list used by GitHub
145+
linguist](https://github.com/github-linguist/linguist/blob/537297cdae3ab05f8d5dd1c03627a5bd73707b19/lib/linguist/languages.yml)
146+
(which powers their language analysis on the back end).
137147
- Lists for `EXCLUDE_REPOS` and `EXCLUDE_LANGS` can use globbing patterns.
138-
For example, to exclude all repos by "@jstrieb", add `jstrieb/*` to
148+
For example, to exclude all repos by user "jstrieb", add `jstrieb/*` to
139149
`EXCLUDE_REPOS`.
140150
- These can also be set directly in [the Actions
141151
workflow](.github/workflows/main.yml), but you should set them as secrets

0 commit comments

Comments
 (0)