You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-31Lines changed: 44 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,11 +35,11 @@ in most of our repositories._
35
35
36
36
__Here are a Few Example Badges__
37
37
* Example with moderate number of users:
38
-

38
+

39
39
* Example with very large number of users (`actions/setup-python`):
40
-

40
+

41
41
* Example with huge number of users (`actions/checkout`):
42
-

42
+

43
43
44
44
## Table of Contents
45
45
@@ -93,16 +93,15 @@ jobs:
93
93
94
94
You can then pass the URL of the endpoint to Shields to generate and
95
95
insert a badge into your README with the following Markdown. Just be sure to
96
-
replace `OWNERUSERID`, `REPOSITORY`, and `BRANCH` as appropriate, and also be sure
97
-
to retain the various encodings of colons (`%3A`), and backslashes (`%2F`).
96
+
replace `OWNERUSERID`, `REPOSITORY`, and `BRANCH` as appropriate.
98
97
99
98
```markdown
100
-

99
+

101
100
```
102
101
103
102
Note that in the above, you are relying on GitHub's `raw.githubusercontent.com`
104
103
server for serving the endpoint to Shields. We do not actually recommend doing this
105
-
as that server isn't really intended for that purpose, and may create a noticeable delay
104
+
as that server isn't really intended for that purpose, and may create a delay
106
105
that will trickle down to Shields serving the badge. However, you might initially
107
106
set it up this way to try out the action.
108
107
See [Example 2](#example-2-serving-via-github-pages-from-the-docs-directory)
@@ -207,11 +206,10 @@ then your endpoint will be accessible from
You can then use the following Markdown to insert the badge in your README.
210
-
Just be sure to replace `YOURUSERID` and `REPOSITORY` as appropriate, and also be sure
211
-
to retain the various encodings of colons (`%3A`), and backslashes (`%2F`).
209
+
Just be sure to replace `YOURUSERID` and `REPOSITORY` as appropriate.
212
210
213
211
```markdown
214
-

212
+

215
213
```
216
214
217
215
If you are also utilizing GitHub Pages for a project site, then you might want
@@ -221,7 +219,7 @@ accomplish that with the following action input: `target-directory: docs/endpoin
221
219
This would change the necessary Markdown for inserting the badge to:
222
220
223
221
```markdown
224
-

222
+

225
223
```
226
224
227
225
See [later in this document](#how-to-link-the-badge-to-search-results) for an
@@ -278,19 +276,18 @@ As in the previous example, the JSON endpoint will be at
278
276
the root of the project site
279
277
(`https://YOURUSERID.github.io/REPOSITORY/action-name.json`). Thus, you can then use the
280
278
following Markdown to insert the badge in your README.
281
-
Just be sure to replace `YOURUSERID` and `REPOSITORY` as appropriate, and also be sure
282
-
to retain the various encodings of colons (`%3A`), and backslashes (`%2F`).
279
+
Just be sure to replace `YOURUSERID` and `REPOSITORY` as appropriate.
283
280
284
281
```markdown
285
-

282
+

286
283
```
287
284
288
285
If you'd rather have it in a subdirectory, you can set the appropriate action input,
289
286
such as with: `target-directory: endpoints`. Doing so would then require
290
287
the following Markdown for inserting the badge into the README:
291
288
292
289
```markdown
293
-

290
+

294
291
```
295
292
296
293
See [later in this document](#how-to-link-the-badge-to-search-results) for an
@@ -346,7 +343,7 @@ release that you wish to use, such as with the following:
346
343
347
344
```yml
348
345
- name: Generate user count JSON endpoint
349
-
uses: cicirello/count-action-users@v1.0.1
346
+
uses: cicirello/count-action-users@v1.0.2
350
347
with:
351
348
action-list: owner/action-name
352
349
env:
@@ -368,25 +365,22 @@ you might consider linking it to a GitHub search results page. You can do that
368
365
with the following Markdown. Replace "YOURUSERID" with the user id of the owner
369
366
of the action, and replace "ACTIONNAME" with the name of the action. Also replace
370
367
"RELEVANT_SHIELDS_URL"with the link that generates the badge from the endpoint
371
-
(see the examples in the workflow examples above). Also be sure
372
-
to retain the various encodings of colons (`%3A`), and backslashes (`%2F`).
368
+
(see the examples in the workflow examples above).
373
369
374
370
```markdown
375
-
[](https://github.com/search?q=YOURUSERID+ACTIONNAME+path%3A.github%2Fworkflows+language%3AYAML&type=Code)
371
+
[](https://github.com/search?q=YOURUSERID+ACTIONNAME+path:.github/workflows+language:YAML&type=Code)
376
372
```
377
373
378
374
## FAQ
379
375
380
376
__Why not instead submit a pull request to Shields to add direct support to their
381
377
awesome project for an actions users count badge?__ The GitHub Code Search API, which
382
378
we utilize for this action, has a rate limit of 30 queries per minute for an
383
-
authenticated user; and can also potentially interact with other secondary rate limits.
379
+
authenticated user; and can also potentially interact with other secondary rate limits,
380
+
including some secondary limits that are not published.
384
381
By running this as an action, the necessary queries benefit
385
-
from the GITHUB_TOKEN of the user of this action, and in theory the rate limit should
386
-
never come into effect unless you attempt to run
387
-
it to generate endpoints for many actions within a single workflow run, or are
388
-
otherwise querying the code search API (or other GitHub APIs) at the same time with
389
-
another tool, or run into a secondary rate limit. I imagine the rate
382
+
from the GITHUB_TOKEN of the user of this action, and in theory we can more easily
383
+
stay within the rate limits. I imagine the rate
390
384
limit would be significantly more challenging for a solution directly integrated with
391
385
Shields. We additionally have a built-in time delay in between queries for those using
0 commit comments