Skip to content

Commit aa834d0

Browse files
authored
Merge pull request #136 from hwine/hwine/doc-fix
Fix links to GitHub docs
2 parents 9b4f6fe + 61cb3ec commit aa834d0

16 files changed

+220
-224
lines changed

00_core.ipynb

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
"outputs": [],
163163
"source": [
164164
"#export\n",
165-
"_docroot = 'https://docs.github.com/en/free-pro-team@latest/rest/reference/'"
165+
"_docroot = 'https://docs.github.com/rest/reference/'"
166166
]
167167
},
168168
{
@@ -399,7 +399,7 @@
399399
"cell_type": "markdown",
400400
"metadata": {},
401401
"source": [
402-
"GitHub has various [rate limits](https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#rate-limiting) for their API. After each call, the response includes information about how many requests are remaining in the hourly quota. If you'd like to add alerts, or indications showing current quota usage, you can register a callback with `GhApi` by passing a callable to the `limit_cb` parameter. This callback will be called whenever the amount of quota used changes. It will be called with two arguments: the new quota remaining, and the total hourly quota."
402+
"GitHub has various [rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting) for their API. After each call, the response includes information about how many requests are remaining in the hourly quota. If you'd like to add alerts, or indications showing current quota usage, you can register a callback with `GhApi` by passing a callable to the `limit_cb` parameter. This callback will be called whenever the amount of quota used changes. It will be called with two arguments: the new quota remaining, and the total hourly quota."
403403
]
404404
},
405405
{
@@ -508,41 +508,37 @@
508508
{
509509
"data": {
510510
"text/markdown": [
511-
"- [actions](https://docs.github.com/en/free-pro-team@latest/rest/reference/actions)\n",
512-
"- [activity](https://docs.github.com/en/free-pro-team@latest/rest/reference/activity)\n",
513-
"- [apps](https://docs.github.com/en/free-pro-team@latest/rest/reference/apps)\n",
514-
"- [billing](https://docs.github.com/en/free-pro-team@latest/rest/reference/billing)\n",
515-
"- [checks](https://docs.github.com/en/free-pro-team@latest/rest/reference/checks)\n",
516-
"- [code_scanning](https://docs.github.com/en/free-pro-team@latest/rest/reference/code-scanning)\n",
517-
"- [codes_of_conduct](https://docs.github.com/en/free-pro-team@latest/rest/reference/codes-of-conduct)\n",
518-
"- [codespaces](https://docs.github.com/en/free-pro-team@latest/rest/reference/codespaces)\n",
519-
"- [dependabot](https://docs.github.com/en/free-pro-team@latest/rest/reference/dependabot)\n",
520-
"- [dependency_graph](https://docs.github.com/en/free-pro-team@latest/rest/reference/dependency-graph)\n",
521-
"- [emojis](https://docs.github.com/en/free-pro-team@latest/rest/reference/emojis)\n",
522-
"- [enterprise_admin](https://docs.github.com/en/free-pro-team@latest/rest/reference/enterprise-admin)\n",
523-
"- [gists](https://docs.github.com/en/free-pro-team@latest/rest/reference/gists)\n",
524-
"- [git](https://docs.github.com/en/free-pro-team@latest/rest/reference/git)\n",
525-
"- [gitignore](https://docs.github.com/en/free-pro-team@latest/rest/reference/gitignore)\n",
526-
"- [interactions](https://docs.github.com/en/free-pro-team@latest/rest/reference/interactions)\n",
527-
"- [issues](https://docs.github.com/en/free-pro-team@latest/rest/reference/issues)\n",
528-
"- [licenses](https://docs.github.com/en/free-pro-team@latest/rest/reference/licenses)\n",
529-
"- [markdown](https://docs.github.com/en/free-pro-team@latest/rest/reference/markdown)\n",
530-
"- [meta](https://docs.github.com/en/free-pro-team@latest/rest/reference/meta)\n",
531-
"- [migrations](https://docs.github.com/en/free-pro-team@latest/rest/reference/migrations)\n",
532-
"- [oauth_authorizations](https://docs.github.com/en/free-pro-team@latest/rest/reference/oauth-authorizations)\n",
533-
"- [oidc](https://docs.github.com/en/free-pro-team@latest/rest/reference/oidc)\n",
534-
"- [orgs](https://docs.github.com/en/free-pro-team@latest/rest/reference/orgs)\n",
535-
"- [packages](https://docs.github.com/en/free-pro-team@latest/rest/reference/packages)\n",
536-
"- [projects](https://docs.github.com/en/free-pro-team@latest/rest/reference/projects)\n",
537-
"- [pulls](https://docs.github.com/en/free-pro-team@latest/rest/reference/pulls)\n",
538-
"- [rate_limit](https://docs.github.com/en/free-pro-team@latest/rest/reference/rate-limit)\n",
539-
"- [reactions](https://docs.github.com/en/free-pro-team@latest/rest/reference/reactions)\n",
540-
"- [repos](https://docs.github.com/en/free-pro-team@latest/rest/reference/repos)\n",
541-
"- [scim](https://docs.github.com/en/free-pro-team@latest/rest/reference/scim)\n",
542-
"- [search](https://docs.github.com/en/free-pro-team@latest/rest/reference/search)\n",
543-
"- [secret_scanning](https://docs.github.com/en/free-pro-team@latest/rest/reference/secret-scanning)\n",
544-
"- [teams](https://docs.github.com/en/free-pro-team@latest/rest/reference/teams)\n",
545-
"- [users](https://docs.github.com/en/free-pro-team@latest/rest/reference/users)"
511+
"- [actions](https://docs.github.com/rest/reference/actions)\n",
512+
"- [activity](https://docs.github.com/rest/reference/activity)\n",
513+
"- [apps](https://docs.github.com/rest/reference/apps)\n",
514+
"- [billing](https://docs.github.com/rest/reference/billing)\n",
515+
"- [checks](https://docs.github.com/rest/reference/checks)\n",
516+
"- [code_scanning](https://docs.github.com/rest/reference/code-scanning)\n",
517+
"- [codes_of_conduct](https://docs.github.com/rest/reference/codes-of-conduct)\n",
518+
"- [emojis](https://docs.github.com/rest/reference/emojis)\n",
519+
"- [enterprise_admin](https://docs.github.com/rest/reference/enterprise-admin)\n",
520+
"- [gists](https://docs.github.com/rest/reference/gists)\n",
521+
"- [git](https://docs.github.com/rest/reference/git)\n",
522+
"- [gitignore](https://docs.github.com/rest/reference/gitignore)\n",
523+
"- [interactions](https://docs.github.com/rest/reference/interactions)\n",
524+
"- [issues](https://docs.github.com/rest/reference/issues)\n",
525+
"- [licenses](https://docs.github.com/rest/reference/licenses)\n",
526+
"- [markdown](https://docs.github.com/rest/reference/markdown)\n",
527+
"- [meta](https://docs.github.com/rest/reference/meta)\n",
528+
"- [migrations](https://docs.github.com/rest/reference/migrations)\n",
529+
"- [oauth_authorizations](https://docs.github.com/rest/reference/oauth-authorizations)\n",
530+
"- [orgs](https://docs.github.com/rest/reference/orgs)\n",
531+
"- [packages](https://docs.github.com/rest/reference/packages)\n",
532+
"- [projects](https://docs.github.com/rest/reference/projects)\n",
533+
"- [pulls](https://docs.github.com/rest/reference/pulls)\n",
534+
"- [rate_limit](https://docs.github.com/rest/reference/rate-limit)\n",
535+
"- [reactions](https://docs.github.com/rest/reference/reactions)\n",
536+
"- [repos](https://docs.github.com/rest/reference/repos)\n",
537+
"- [scim](https://docs.github.com/rest/reference/scim)\n",
538+
"- [search](https://docs.github.com/rest/reference/search)\n",
539+
"- [secret_scanning](https://docs.github.com/rest/reference/secret-scanning)\n",
540+
"- [teams](https://docs.github.com/rest/reference/teams)\n",
541+
"- [users](https://docs.github.com/rest/reference/users)"
546542
],
547543
"text/plain": [
548544
"<__main__.GhApi at 0x11e204eb0>"

01_actions.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@
6262
" CONTEXT_GITHUB: ${{ toJson(github) }}\n",
6363
"```\n",
6464
"\n",
65-
"This stores the full [github context](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context), which includes information such as the name of the current workflow being run, the GitHub access token, and so forth.\n",
65+
"This stores the full [github context](https://docs.github.com/actions/reference/context-and-expression-syntax-for-github-actions#github-context), which includes information such as the name of the current workflow being run, the GitHub access token, and so forth.\n",
6666
"\n",
6767
"As well as the `github` context, you can do that same thing for any of the other GitHub Actions contexts, which are:\n",
6868
"\n",
6969
"`github` `env` `job` `steps` `runner` `secrets` `strategy` `matrix` `needs`\n",
7070
"\n",
71-
"For instance, for the [needs](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds) context, information about previous jobs specified in your `needs` clause, add this underneath your `CONTEXT_GITHUB` line:\n",
71+
"For instance, for the [needs](https://docs.github.com/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds) context, information about previous jobs specified in your `needs` clause, add this underneath your `CONTEXT_GITHUB` line:\n",
7272
"\n",
7373
"```bash\n",
7474
" CONTEXT_NEEDS: ${{ toJson(needs) }}\n",
@@ -107,7 +107,7 @@
107107
"cell_type": "markdown",
108108
"metadata": {},
109109
"source": [
110-
"GitHub also adds a number of [`GITHUB_*` environment variables](https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables) to all runners. These are available through the `env_github` `AttrDict`, with the `GITHUB_` prefix removed, and remainder converted to lowercase. For instance:"
110+
"GitHub also adds a number of [`GITHUB_*` environment variables](https://docs.github.com/actions/reference/environment-variables#default-environment-variables) to all runners. These are available through the `env_github` `AttrDict`, with the `GITHUB_` prefix removed, and remainder converted to lowercase. For instance:"
111111
]
112112
},
113113
{
@@ -528,7 +528,7 @@
528528
"cell_type": "markdown",
529529
"metadata": {},
530530
"source": [
531-
"Details in the [GitHub Documentation for `set-output`](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter)."
531+
"Details in the [GitHub Documentation for `set-output`](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter)."
532532
]
533533
},
534534
{
@@ -547,7 +547,7 @@
547547
"cell_type": "markdown",
548548
"metadata": {},
549549
"source": [
550-
"Details in the [GitHub Documentation for `debug`](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message). Note that you must create a secret named `ACTIONS_STEP_DEBUG` with the value true to see the debug messages set by this command in the log."
550+
"Details in the [GitHub Documentation for `debug`](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message). Note that you must create a secret named `ACTIONS_STEP_DEBUG` with the value true to see the debug messages set by this command in the log."
551551
]
552552
},
553553
{
@@ -566,7 +566,7 @@
566566
"cell_type": "markdown",
567567
"metadata": {},
568568
"source": [
569-
"Details in the [GitHub Documentation for `warning`](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message). For the optional `details`, you can provide comma-delimited file, line, and column information, e.g.: `file=app.js,line=1,col=5`."
569+
"Details in the [GitHub Documentation for `warning`](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message). For the optional `details`, you can provide comma-delimited file, line, and column information, e.g.: `file=app.js,line=1,col=5`."
570570
]
571571
},
572572
{
@@ -585,7 +585,7 @@
585585
"cell_type": "markdown",
586586
"metadata": {},
587587
"source": [
588-
"Details in the [GitHub Documentation for `error`](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-error-message). For the optional `details`, you can provide comma-delimited file, line, and column information, e.g.: `file=app.js,line=1,col=5`."
588+
"Details in the [GitHub Documentation for `error`](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#setting-an-error-message). For the optional `details`, you can provide comma-delimited file, line, and column information, e.g.: `file=app.js,line=1,col=5`."
589589
]
590590
},
591591
{
@@ -626,7 +626,7 @@
626626
"cell_type": "markdown",
627627
"metadata": {},
628628
"source": [
629-
"Details in the GitHub Documentation for [grouping log lines](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#grouping-log-lines)."
629+
"Details in the GitHub Documentation for [grouping log lines](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#grouping-log-lines)."
630630
]
631631
},
632632
{
@@ -645,7 +645,7 @@
645645
"cell_type": "markdown",
646646
"metadata": {},
647647
"source": [
648-
"Details in the [GitHub Documentation for `add-mask`](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#masking-a-value-in-log)."
648+
"Details in the [GitHub Documentation for `add-mask`](https://docs.github.com/actions/reference/workflow-commands-for-github-actions#masking-a-value-in-log)."
649649
]
650650
},
651651
{

03_page.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"cell_type": "markdown",
4444
"metadata": {},
4545
"source": [
46-
"Some GitHub API operations return their results one page at a time. For instance, there are many thousands of [gists](https://docs.github.com/en/free-pro-team@latest/github/writing-on-github/creating-gists), but if we call `list_public` we only see the first 30:"
46+
"Some GitHub API operations return their results one page at a time. For instance, there are many thousands of [gists](https://docs.github.com/github/writing-on-github/creating-gists), but if we call `list_public` we only see the first 30:"
4747
]
4848
},
4949
{

10_cli.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"cell_type": "markdown",
3535
"metadata": {},
3636
"source": [
37-
"You can use `GhApi` via the command line, and can access nearly everything in the [GitHub API](https://docs.github.com/en/free-pro-team@latest/rest).\n",
37+
"You can use `GhApi` via the command line, and can access nearly everything in the [GitHub API](https://docs.github.com/rest).\n",
3838
"\n",
3939
"There are three commands provided. For most people, `ghapi` will be the easiest to use. All three commands take the following parameters:\n",
4040
"\n",
@@ -61,7 +61,7 @@
6161
"source": [
6262
"To get started with the `ghapi` command, first find the name of the operation you wish to perform. If you've used the Python API, then you already know the operation names - they're whatever you type in Python after \"`api.`\". To find the name of the operation you need, search the [full API reference](https://ghapi.fast.ai/fullapi.html) which contains information about every endpoint in the entire GitHub API. For instance, if you want to work with GitHub Issues, then searching for \"issues\" on the full reference page will take you to [this section](https://ghapi.fast.ai/fullapi.html#issues).\n",
6363
"\n",
64-
"The first operation listed there is [issues.list](https://docs.github.com/en/free-pro-team@latest/rest/reference/issues#list-issues-assigned-to-the-authenticated-user), shown with a link to the official GitHub documentation, and a list of parameters that the command accepts. You'll see the official docs list some parameters, such as \"`accept`\", which aren't listed in the GhApi reference - that's because GhApi automatically set some parameters for you.\n",
64+
"The first operation listed there is [issues.list](https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user), shown with a link to the official GitHub documentation, and a list of parameters that the command accepts. You'll see the official docs list some parameters, such as \"`accept`\", which aren't listed in the GhApi reference - that's because GhApi automatically set some parameters for you.\n",
6565
"\n",
6666
"You'll also see that the parameter list on the official docs includes a column marked \"**in**\", which can be \"header\", \"query\", \"path\", or \"body\". The `ghapi` command handles that distinction for you, so you can ignore it for now."
6767
]
@@ -226,7 +226,7 @@
226226
"cell_type": "markdown",
227227
"metadata": {},
228228
"source": [
229-
"If you find the endpoint you want in the GitHub docs, rather than the GhApi reference, you'll see a `path` and a `verb` instead of an operation name. For example, here's the GitHub documentation for [git.getref](https://docs.github.com/en/free-pro-team@latest/rest/reference/git#get-a-reference). The white text on blue background section shows that the verb required is \"`GET`\". Next to that is the path, which is listed as \"`/repos/{owner}/{repo}/git/ref/{ref}`\".\n",
229+
"If you find the endpoint you want in the GitHub docs, rather than the GhApi reference, you'll see a `path` and a `verb` instead of an operation name. For example, here's the GitHub documentation for [git.getref](https://docs.github.com/rest/reference/git#get-a-reference). The white text on blue background section shows that the verb required is \"`GET`\". Next to that is the path, which is listed as \"`/repos/{owner}/{repo}/git/ref/{ref}`\".\n",
230230
"\n",
231231
"To call an endpoint when you have this information from the GitHub docs, use the `ghpath` command. The arguments are exactly the same as `ghapi`, except that instead of an operation name, you provide the path (which you can paste directly from the GitHub docs) and verb."
232232
]

0 commit comments

Comments
 (0)