mkdocstrings-github 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/.github/workflows/docs.yaml +1 -1
  2. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/.github/workflows/release.yaml +1 -1
  3. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/PKG-INFO +1 -1
  4. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/usage/general.md +1 -1
  5. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/usage/headings.md +1 -1
  6. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/usage/index.md +6 -2
  7. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/usage/parameters.md +8 -7
  8. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/usage/signatures.md +6 -4
  9. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/pyproject.toml +3 -4
  10. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/handler.py +12 -5
  11. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/uv.lock +1 -1
  12. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/.github/CODEOWNERS +0 -0
  13. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/.github/CONTRIBUTING.md +0 -0
  14. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/.github/FUNDING.yml +0 -0
  15. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/.github/renovate.json5 +0 -0
  16. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/.github/workflows/example_workflow.yml +0 -0
  17. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/.github/workflows/qualify.yaml +0 -0
  18. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/.gitignore +0 -0
  19. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/.gitmodules +0 -0
  20. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/.pre-commit-config.yaml +0 -0
  21. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/CHANGELOG.md +0 -0
  22. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/LICENSE +0 -0
  23. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/README.md +0 -0
  24. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/action.yaml +0 -0
  25. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/changelog.md +0 -0
  26. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/contributing.md +0 -0
  27. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/credits.md +0 -0
  28. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/favicon.png +0 -0
  29. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/index.md +0 -0
  30. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/license-page.md +0 -0
  31. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/logo.png +0 -0
  32. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/overrides/main.html +0 -0
  33. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/overrides/partials/toc-item.html +0 -0
  34. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/docs/stylesheets/extra.css +0 -0
  35. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/logo.png +0 -0
  36. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/mkdocs.yml +0 -0
  37. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/__init__.py +0 -0
  38. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/config.py +0 -0
  39. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/objects.py +0 -0
  40. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/py.typed +0 -0
  41. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/rendering.py +0 -0
  42. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/templates/material/action.html.jinja +0 -0
  43. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/templates/material/heading.html.jinja +0 -0
  44. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/templates/material/inputs.html.jinja +0 -0
  45. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/templates/material/outputs.html.jinja +0 -0
  46. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/templates/material/secrets.html.jinja +0 -0
  47. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/templates/material/style.css +0 -0
  48. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/src/mkdocstrings_handlers/github/templates/material/workflow.html.jinja +0 -0
  49. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/__init__.py +0 -0
  50. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/conftest.py +0 -0
  51. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/docs/.gitkeep +0 -0
  52. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/helpers.py +0 -0
  53. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/__init__.py +0 -0
  54. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/.gitignore +0 -0
  55. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/0a37a4286738a72a224871dbd1bcd3c662e768f800a8e2b92c410d672c1d19fc.html +0 -0
  56. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/0c67cdd8572de4a97d061f099552f428affde9f418d962c119559531a92f57aa.html +0 -0
  57. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/0ef4f0725dafdff18802cd0dd8839c35562755c90458f0dd3ef7743e87efdd89.html +0 -0
  58. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/1322d6390dbc167e4d2734b6ff7ac30265a52feb242ece864fd08dd36a88214a.html +0 -0
  59. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/1bb484ae2f4d2bfc6473c265761d6ba4f76c5be5dbd3a9059758e67589f4b320.html +0 -0
  60. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/22929d6c2b70b481583d7b07fd7bff72dba985a465d42ad4ee5a7f557429102f.html +0 -0
  61. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/24dfcb59a486346316de8203f742d4f3dd9129f9a57252c37741ad27d0eaddd7.html +0 -0
  62. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/2500c66e16468b20050dd9b8b152a48644d008c0316e444f47afc7bc5117e004.html +0 -0
  63. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/27b0437dc257c9970044eb25da334453829a4ae0450e98cf7a965aff5ad7fcba.html +0 -0
  64. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/28df0ab9fe5662687b72cbb8b2c8e2e18b98beb5a114a505ad845c91b8955a2e.html +0 -0
  65. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/293f8ca976970a4fb9549b1bd3b6f6be8a13bd86d9c34bb98813def62a5777aa.html +0 -0
  66. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/2eb63f18b2d0aaf8000ffcc081c80067937fc7cacea496c2871198aa3bc12a14.html +0 -0
  67. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/36d5597971381260ce0cd98b6ba1c3973134add32288bf34f47290fdbe55b0ec.html +0 -0
  68. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/37c546e4aceaf4af0a681bdaa444b8be901c78713e762fd96d2237b8a78811c5.html +0 -0
  69. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/3cb099624d882a4cde3ef6fdbea56c9aced9331dca1e19c7bc311c2611782e0d.html +0 -0
  70. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/50af1499553795c8cd859a1c9aa5ba162ef1c3dd9fa466668fc2da5bb002a61c.html +0 -0
  71. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/572198cee6d40e3c875970ee6b4c654b3edae54c5a00ee4792df2b0d5a161796.html +0 -0
  72. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/5a2f11e94bc00c7a5122364dcffcdc9bd5c514a773fbf4d1b04fa7e96ba2cfa5.html +0 -0
  73. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/5f0693318b13614e630f852af6ad9165a3793e2e011d4de786b84e178eb411bc.html +0 -0
  74. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/62440ee595f9a66c9c38e2dd31dd0333a03332893c982993b48c6e8e9074b5be.html +0 -0
  75. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/757b79d7975f29e7b7eeda8c910578cb858a867dc4c647c4b5bc9a4c45dbf62e.html +0 -0
  76. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/78f74a133e98bd757a1bd1c4667dc3a5d7cc40cc78daf596187999cb083ec6c4.html +0 -0
  77. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/78feb92e4171bf067dd1615523e5c9cac0de998bb7102ee70da2e145d1262339.html +0 -0
  78. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/84f918940f7b729b21a97d971a27bf994b2deb8ee5d9909481d98f702dfec96a.html +0 -0
  79. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/856a4ff20ee15b09367d852d57cdb6a3376b799760365dbf7677c216156a7b4d.html +0 -0
  80. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/8df27f9a94e16efe5686ebeded8a93bd5b071f4d39fe47224ce218a6b1e58b90.html +0 -0
  81. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/93bf082d40ca4b6730a503aa4d265901a8cfed7ed1a6e9bb6e584c2c3ebd18af.html +0 -0
  82. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/98e4b6474a6f67576ae40a75e152e6bd8c3e743259ad7f1d08890def2ff858d1.html +0 -0
  83. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/98ed5c777c164326632ca657e3cb87ae3f9b75bf9793ab2db4ab90ee7874621c.html +0 -0
  84. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/a5c25b6859cc07004c872762d51e1c17d597a5d9cf4f325f0d876cafc3096d16.html +0 -0
  85. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/ac47b3b933709154de762d06903d78925cea9f1ec93865386d669680cf17e4a8.html +0 -0
  86. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/b3235de10ed47f4d1a0d1d5fec8deb8323199b703201cc3a525950411079672b.html +0 -0
  87. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/b972a05ffc5672d471d5b1e84b01470a3363a25f9d9adbc8d82f4b9fd21a94a1.html +0 -0
  88. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/bbea0ecf08aec9444ed75cbffd5424aa19e285ac64a53d1bb50f6130230b3c97.html +0 -0
  89. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/c2181f9e06dd6b7437f14e815c4fd32ec304e4474c93e86c02b43f41367a79ff.html +0 -0
  90. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/c50b7f91aafff5caf0fe0ff96a922b499617966705cde0d3622191f51f523b38.html +0 -0
  91. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/c8601796046ec0837b1cc98f777d45532e7c2c36606b8682536e0aac3f678554.html +0 -0
  92. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/c8c895c400f0532aa3afe641f79ed14bc399b504169242c0a9f77572c185def2.html +0 -0
  93. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/cdad9a8909ec6448ff4392f523d4c7d41dcba61fc635e7e744026f901df04913.html +0 -0
  94. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/cdf58c1c57a805ff06487f8361728c09ddf37f7ef3235ad26effab9f1f07f5a4.html +0 -0
  95. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/d0d656ae32436d7b190665f98f3fe2d7a6250ee7ff4e1fb1bcd9a1364d3da2cb.html +0 -0
  96. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/d2e25cb02f371db9bd247a36766f7887ef1d2adad97ba1102ab1d98cf3128dc3.html +0 -0
  97. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/dbb6b804e35c3cf48b6ea556486a82cf6f34af4d7cc455bfc02995969f45d09f.html +0 -0
  98. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/e5a8b4ccf8097faf7e34c1a90377932fad0277a6b89675ef7b9e05fa37fae38c.html +0 -0
  99. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/f0d6c0adbfcc02896663bc47e38910252279cabfe89c8c196c23f02b7d65d77d.html +0 -0
  100. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/f575eacc0b72560cfc4e759f838f4ba8fc6ad1ee88d56fa707a1a840baf3e679.html +0 -0
  101. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/f90542b4e3cbaf7e9820cdad6bbe707e3210983c911f11584cfae580e5cf6a04.html +0 -0
  102. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/snapshots/external/fab6f055074f9b57075eb9f63d7a2f6ce6eb7ae6c5289a675cb24e507f3f5fb5.html +0 -0
  103. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/test_handler.py +0 -0
  104. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/test_render_action.py +0 -0
  105. {mkdocstrings_github-0.2.0 → mkdocstrings_github-0.2.2}/test/test_render_workflow.py +0 -0
@@ -61,7 +61,7 @@ jobs:
61
61
  shell: bash
62
62
  env:
63
63
  PUSH_DEPLOY: ${{ fromJson(inputs.push) && '--push' || '' }}
64
- GITHUB_TOKEN: ${{ github.token }}
64
+ GH_TOKEN: ${{ github.token }}
65
65
  VERSION: ${{ inputs.version }}
66
66
  run: |
67
67
  if [[ $VERSION =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
@@ -109,7 +109,7 @@ jobs:
109
109
  env:
110
110
  GH_TOKEN: ${{ steps.app-token.outputs.token }}
111
111
  run: |
112
- uv run semantic-release -v version --commit --tag --push --changelog --vcs-release --skip-build
112
+ uv run semantic-release -v version --commit --tag --push --changelog --vcs-release
113
113
 
114
114
  deploy:
115
115
  name: Deploy package distributions
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocstrings-github
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: A GitHub Action handler for mkdocstrings
5
5
  Author-email: Mark Hu <watermarkhu@gmail.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  # General options
2
2
 
3
- ??? info "Example yaml files"
3
+ ??? info "Example action/workflow"
4
4
 
5
5
  ??? preview "compsite action `action.yaml`"
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Headings options
2
2
 
3
- ??? info "Example yaml files"
3
+ ??? info "Example action/workflow"
4
4
 
5
5
  ??? preview "compsite action `action.yaml`"
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Usage
2
2
 
3
- !!! info "Example yaml files"
3
+ !!! info "Example action/workflow"
4
4
 
5
5
  Throughout the next pages, we will use a composite action `action.yaml` and a reusable workflow `.github/workflows/example_workflow.yml` as examples.
6
6
 
@@ -18,7 +18,7 @@
18
18
 
19
19
  ## Installation
20
20
 
21
- This package is extension package to [*mkdocstrings*](https://mkdocstrings.github.io/), which is a framework for auto-documentation for various languanges, which can plugin into the framework by providing *handlers*. The *mkdocstrings-github* package provides a GitHub hanlder.
21
+ This package is extension package to [*mkdocstrings*](https://mkdocstrings.github.io/), a framework for auto-documentation for various languages. Language support is inserted into the framework by providing *handlers*. The *mkdocstrings-github* package provides a GitHub handler.
22
22
 
23
23
  --8<-- "README.md:install"
24
24
 
@@ -80,6 +80,10 @@ For reusable workflows, which are workflows that include the [`workflow_call`](h
80
80
  ::: .github/workflows/myworkflow.yml
81
81
  ```
82
82
 
83
+ ## Linking
84
+
85
+ For every documented action or workflow, HTML tags are inserted on the page to allow linking with the action/workflow path as the id. Additionally, linking to action and workflow parameters, and cross-linking to other parameters, is possible with the [`parameters_anchors`][mkdocstrings_handlers.github.config.GitHubOptions.parameters_anchors] option.
86
+
83
87
  ## Configuration
84
88
 
85
89
  When installed, the Github handler can be configured in `mkdocs.yml`
@@ -1,6 +1,6 @@
1
1
  # Parameters options
2
2
 
3
- ??? info "Example yaml files"
3
+ ??? info "Example action/workflow"
4
4
 
5
5
  ??? preview "compsite action `action.yaml`"
6
6
 
@@ -14,12 +14,6 @@
14
14
  --8<-- ".github/workflows/example_workflow.yml"
15
15
  ```
16
16
 
17
- !!! tip "Cross linking parameters"
18
-
19
- It is possible to cross-link parameters within the yaml descriptions by a markdown link in the format `[text](#<domain>.<name>)`.
20
-
21
- E.g. the input `my_input` can be linked with `[text](#inputs.my_input)` the secret `MY_SECRET` is linked with `[text](#secrets.MY_SECRET)`.
22
-
23
17
  ::: mkdocstrings_handlers.github.config.GitHubOptions.show_inputs
24
18
  handler: python
25
19
 
@@ -142,6 +136,13 @@
142
136
  ::: mkdocstrings_handlers.github.config.GitHubOptions.parameters_anchors
143
137
  handler: python
144
138
 
139
+
140
+ !!! tip "Cross linking parameters"
141
+
142
+ It is possible to cross-link parameters within the yaml descriptions by a markdown link in the format `[text](#<domain>.<name>)`.
143
+
144
+ E.g. the input `my_input` can be linked with `[text](#inputs.my_input)` the secret `MY_SECRET` is linked with `[text](#secrets.MY_SECRET)`.
145
+
145
146
  ??? preview
146
147
 
147
148
  === "`parameters_anchors: true`"
@@ -1,6 +1,6 @@
1
1
  # Signatures options
2
2
 
3
- ??? info "Example yaml files"
3
+ ??? info "Example action/workflow"
4
4
 
5
5
  ??? preview "compsite action `action.yaml`"
6
6
 
@@ -71,20 +71,22 @@
71
71
 
72
72
  !!! info
73
73
 
74
- To automatically grab the latest `major` or `semver` release, *mkdocstrings-github* needs to access GitHub to get the releases. Authentication is set by either the environment variable `GITHUB_TOKEN`, or via [`.netrc`](https://pygithub.readthedocs.io/en/stable/examples/Authentication.html#netrc-authentication). If both aren't available, a final attempt is made via the GitHub [`gh auth token`](https://cli.github.com/manual/gh_auth_token).
74
+ To automatically grab the latest `major` or `semver` release, *mkdocstrings-github* needs to access GitHub to get the releases. Authentication is set by either the environment variable `GH_TOKEN`, or via [`.netrc`](https://pygithub.readthedocs.io/en/stable/examples/Authentication.html#netrc-authentication). If both aren't available, a final attempt is made via the GitHub CLI with [`gh auth token`](https://cli.github.com/manual/gh_auth_token).
75
75
 
76
- When building your documentation in GitHub Actions, make sure that the build step has the environment variable `GITHUB_TOKEN` set.
76
+ When building your documentation in GitHub Actions, make sure that the build step has the environment variable `GH_TOKEN` set.
77
77
 
78
78
  ```yaml title="Example build step"
79
79
  ...
80
80
  - name: build step
81
81
  env:
82
- GITHUB_TOKEN: ${{ github.token }}
82
+ GH_TOKEN: ${{ github.token }}
83
83
  run: |
84
84
  mkdocs build
85
85
  ```
86
86
 
87
+ !!! info
87
88
 
89
+ For GitHub Enterprise instances, you need to additionally set the `GH_HOST` environment variable to your GitHub hostname.
88
90
 
89
91
  ??? preview
90
92
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mkdocstrings-github"
3
- version = "0.2.0"
3
+ version = "0.2.2"
4
4
  description = "A GitHub Action handler for mkdocstrings"
5
5
  authors = [
6
6
  { name = "Mark Hu", email = "watermarkhu@gmail.com" }
@@ -32,9 +32,6 @@ dependencies = [
32
32
  "typing-extensions>=4.0; python_version < '3.11'",
33
33
  ]
34
34
 
35
- [tool.uv.sources]
36
- pygments = { git = "https://github.com/watermarkhu/pygments", branch = "matlab" }
37
-
38
35
  [dependency-groups]
39
36
  dev = [
40
37
  "ty~=0.0.1a19",
@@ -102,8 +99,10 @@ allow-direct-references = true
102
99
  packages = ["src/mkdocstrings_handlers"]
103
100
 
104
101
  [tool.semantic_release]
102
+ build_command = "uv sync"
105
103
  commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
106
104
  commit_parser = "conventional"
105
+ commit_author = "github-actions <actions@github.com>"
107
106
  logging_use_named_masks = false
108
107
  major_on_zero = true
109
108
  allow_zero_version = true
@@ -80,11 +80,17 @@ class GitHubHandler(BaseHandler):
80
80
  ) and "pytest" not in sys.modules:
81
81
  # Use PyGitHub to find last GitHub releases with tags matching vX.X.X and vX
82
82
 
83
- if "GITHUB_TOKEN" in os.environ:
84
- gh = Github(auth=Auth.Token(os.environ["GITHUB_TOKEN"]))
83
+ GH_HOST = os.environ.get("GH_HOST", "https://github.com")
84
+ base_url = f"{GH_HOST}/api/v3"
85
+
86
+ if "GH_TOKEN" in os.environ or "GITHUB_TOKEN" in os.environ:
87
+ gh = Github(
88
+ base_url=base_url,
89
+ auth=Auth.Token(os.environ.get("GH_TOKEN", os.environ.get("GITHUB_TOKEN", ""))),
90
+ )
85
91
  else:
86
92
  try:
87
- gh = Github(auth=Auth.NetrcAuth())
93
+ gh = Github(base_url=base_url, auth=Auth.NetrcAuth())
88
94
  except RuntimeError:
89
95
  try:
90
96
  token = subprocess.check_output(["gh", "auth", "token"], text=True).strip()
@@ -94,8 +100,9 @@ class GitHubHandler(BaseHandler):
94
100
  raise RuntimeError("No token from gh auth token")
95
101
  except Exception:
96
102
  _logger.warning(
97
- "Could not authenticate with GitHub to get releases."
98
- " Consider setting .netrc, environment variable GITHUB_TOKEN, or using GitHub CLI (`gh auth login`) to get GitHub releases.",
103
+ "Could not authenticate with GitHub to get releases. "
104
+ "Consider setting .netrc, environment variable GH_TOKEN, "
105
+ "or using GitHub CLI (`gh auth login`) to get GitHub releases.",
99
106
  )
100
107
  gh = Github()
101
108
 
@@ -788,7 +788,7 @@ wheels = [
788
788
 
789
789
  [[package]]
790
790
  name = "mkdocstrings-github"
791
- version = "0.2.0"
791
+ version = "0.2.2"
792
792
  source = { editable = "." }
793
793
  dependencies = [
794
794
  { name = "gitpython" },