github-action-readme-generator 1.9.2 → 1.10.0

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 (49) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +13 -1
  3. package/action.yml +17 -0
  4. package/dist/bin/index.js +212 -59
  5. package/dist/mjs/Action.d.ts +15 -15
  6. package/dist/mjs/Action.js +11 -4
  7. package/dist/mjs/Action.js.map +1 -1
  8. package/dist/mjs/constants.d.ts +13 -0
  9. package/dist/mjs/constants.js +17 -0
  10. package/dist/mjs/constants.js.map +1 -1
  11. package/dist/mjs/helpers.d.ts +4 -5
  12. package/dist/mjs/helpers.js +201 -33
  13. package/dist/mjs/helpers.js.map +1 -1
  14. package/dist/mjs/inputs.d.ts +3 -11
  15. package/dist/mjs/inputs.js +28 -14
  16. package/dist/mjs/inputs.js.map +1 -1
  17. package/dist/mjs/logtask/index.js +1 -1
  18. package/dist/mjs/logtask/index.js.map +1 -1
  19. package/dist/mjs/prettier.js +4 -3
  20. package/dist/mjs/prettier.js.map +1 -1
  21. package/dist/mjs/readme-editor.js.map +1 -1
  22. package/dist/mjs/readme-generator.d.ts +3 -3
  23. package/dist/mjs/readme-generator.js.map +1 -1
  24. package/dist/mjs/save.d.ts +2 -2
  25. package/dist/mjs/save.js.map +1 -1
  26. package/dist/mjs/sections/index.d.ts +1 -1
  27. package/dist/mjs/sections/index.js +8 -8
  28. package/dist/mjs/sections/index.js.map +1 -1
  29. package/dist/mjs/sections/update-badges.d.ts +1 -1
  30. package/dist/mjs/sections/update-badges.js.map +1 -1
  31. package/dist/mjs/sections/update-branding.d.ts +1 -1
  32. package/dist/mjs/sections/update-branding.js.map +1 -1
  33. package/dist/mjs/sections/update-contents.d.ts +1 -1
  34. package/dist/mjs/sections/update-contents.js.map +1 -1
  35. package/dist/mjs/sections/update-description.d.ts +1 -1
  36. package/dist/mjs/sections/update-description.js.map +1 -1
  37. package/dist/mjs/sections/update-inputs.d.ts +1 -1
  38. package/dist/mjs/sections/update-inputs.js.map +1 -1
  39. package/dist/mjs/sections/update-outputs.d.ts +1 -1
  40. package/dist/mjs/sections/update-outputs.js.map +1 -1
  41. package/dist/mjs/sections/update-title.d.ts +1 -1
  42. package/dist/mjs/sections/update-title.js.map +1 -1
  43. package/dist/mjs/sections/update-usage.d.ts +1 -1
  44. package/dist/mjs/sections/update-usage.js.map +1 -1
  45. package/dist/mjs/svg-editor.d.mts +2 -2
  46. package/dist/mjs/svg-editor.mjs +3 -3
  47. package/dist/mjs/svg-editor.mjs.map +1 -1
  48. package/dist/types/index.d.ts +122 -129
  49. package/package.json +16 -36
package/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ # [1.10.0](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.9.3...v1.10.0) (2026-02-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * add version_source input for flexible version detection ([d8cbcfd](https://github.com/bitflight-devops/github-action-readme-generator/commit/d8cbcfdb5a1e32d25f94f20dd5078195647a0b7e))
7
+
8
+ ## [1.9.3](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.9.2...v1.9.3) (2026-02-04)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * auto-detect owner/repo/version from target repo directory ([c3099a5](https://github.com/bitflight-devops/github-action-readme-generator/commit/c3099a59fb75f14d2444a4978ff31383587cf9bd))
14
+ * detect version from target repo releases/tags ([f20021d](https://github.com/bitflight-devops/github-action-readme-generator/commit/f20021dbb67ab40408e70b079958f0083dac2907))
15
+ * document project's actual rule enforcement, not Biome defaults ([8006731](https://github.com/bitflight-devops/github-action-readme-generator/commit/800673191577a64eb6ad39b6890910380745864e))
16
+ * enable strict Biome linting and fix all violations ([8506785](https://github.com/bitflight-devops/github-action-readme-generator/commit/85067859b45980fe350d2ae0b87e2e01c6e6195f))
17
+ * fail integration tests when validation checks fail ([42898b4](https://github.com/bitflight-devops/github-action-readme-generator/commit/42898b42a2720de38948107a89e6753b5b43d694))
18
+ * fetch tags when checking out test repositories ([c2c61c7](https://github.com/bitflight-devops/github-action-readme-generator/commit/c2c61c77481f29a3967c8bb892eb76ae563777e5))
19
+ * handle .git URLs without suffix in actions/checkout ([e694d09](https://github.com/bitflight-devops/github-action-readme-generator/commit/e694d091439416cb0c535fb38cf25abc096a5be9))
20
+ * pass owner/repo to integration tests ([4e4c3fd](https://github.com/bitflight-devops/github-action-readme-generator/commit/4e4c3fdf998dc794ec8f2d67ceb23acb7febbdd5))
21
+ * prioritize .git/config from target directory over GITHUB_REPOSITORY ([ac2e10e](https://github.com/bitflight-devops/github-action-readme-generator/commit/ac2e10ef62dff20992d146092cb65d94f6bb1c1a))
22
+ * prioritize git tags for version detection (GitHub Actions standard) ([e5c9434](https://github.com/bitflight-devops/github-action-readme-generator/commit/e5c943446c445568a085fa6f673dc4f7c5b61f94))
23
+ * replace forEach exception with proper for...of entries() pattern ([6f5873c](https://github.com/bitflight-devops/github-action-readme-generator/commit/6f5873c44d4a345c712d906155d047d414c2325f))
24
+ * show full diff in integration test output ([acee396](https://github.com/bitflight-devops/github-action-readme-generator/commit/acee39619dc8f1a208aed80ad2d72320d5d8940a))
25
+
1
26
  ## [1.9.2](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.9.1...v1.9.2) (2026-02-01)
2
27
 
3
28
 
package/README.md CHANGED
@@ -177,7 +177,7 @@ This configuration will automatically regenerate your README whenever `action.ym
177
177
  <!-- start usage -->
178
178
 
179
179
  ```yaml
180
- - uses: bitflight-devops/github-action-readme-generator@v1.9.1
180
+ - uses: bitflight-devops/github-action-readme-generator@v1
181
181
  with:
182
182
  # Description: The absolute or relative path to the `action.yml` file to read in
183
183
  # from.
@@ -237,6 +237,17 @@ This configuration will automatically regenerate your README whenever `action.ym
237
237
  # Default: main
238
238
  versioning_default_branch: ""
239
239
 
240
+ # Description: How to detect the action version for the usage example. Options:
241
+ #
242
+ # - `git-tag` - Latest git tag (default, standard for GitHub Actions)
243
+ # - `git-branch` - Current branch name (for bleeding edge users)
244
+ # - `git-sha` - Current commit SHA (for exact pinning)
245
+ # - `package-json` - Read from package.json version field
246
+ # - `explicit` - Use value from `version_override` input only
247
+ #
248
+ # Default: git-tag
249
+ version_source: ""
250
+
240
251
  # Description: Add a prefix to the README title. The title template looks like
241
252
  # this:
242
253
  #
@@ -289,6 +300,7 @@ This configuration will automatically regenerate your README whenever `action.ym
289
300
  | <code>version_override</code> | Set a specific version to display in the README.md, maybe you want to use a major or minor version | | **false** |
290
301
  | <code>version_prefix</code> | Prefix the version with this value, if it isn't already prefixed | <code>v</code> | **false** |
291
302
  | <code>versioning_default_branch</code> | If versioning is disabled, use this branch in the usage example, where the default is <code>main</code><br />Output if your action repo is <code>reviewdog/action-eslint</code>:<br /><code>uses: reviewdog/action-eslint@main</code> | <code>main</code> | **false** |
303
+ | <code>version_source</code> | How to detect the action version for the usage example.<br />Options:<br />- <code>git-tag</code> - Latest git tag (default, standard for GitHub Actions)<br />- <code>git-branch</code> - Current branch name (for bleeding edge users)<br />- <code>git-sha</code> - Current commit SHA (for exact pinning)<br />- <code>package-json</code> - Read from package.json version field<br />- <code>explicit</code> - Use value from <code>version_override</code> input only | <code>git-tag</code> | **false** |
292
304
  | <code>title_prefix</code> | Add a prefix to the README title.<br />The title template looks like this:<br /># {brand}{prefix}{title} | <code>GitHub Action: </code> | **false** |
293
305
  | <code>include_github_version_badge</code> | Include additional badge showing latest tag | <code>true</code> | **false** |
294
306
  | <code>branding_svg_path</code> | Create the branding svg image from the branding object in <code>action.yml</code><br />then save it to this path.<br />Then update the <code>README.md</code> file to source the branding image from this path.<br />You can use a section template like this:<br /><code>\<!-- start branding -->\<!-- stop branding --></code><br />or use the action input:<br /><code>branding_as_title_prefix: true</code><br />to prefix the 'title' section with the image.<br />The title template looks like this:<br /># {brand}{prefix}{title} | <code>.github/ghadocs/branding.svg</code> | **false** |
package/action.yml CHANGED
@@ -69,6 +69,23 @@ inputs:
69
69
  `uses: reviewdog/action-eslint@main`
70
70
  required: false
71
71
  default: main
72
+ version_source:
73
+ description: >
74
+ How to detect the action version for the usage example.
75
+
76
+ Options:
77
+
78
+ - `git-tag` - Latest git tag (default, standard for GitHub Actions)
79
+
80
+ - `git-branch` - Current branch name (for bleeding edge users)
81
+
82
+ - `git-sha` - Current commit SHA (for exact pinning)
83
+
84
+ - `package-json` - Read from package.json version field
85
+
86
+ - `explicit` - Use value from `version_override` input only
87
+ required: false
88
+ default: git-tag
72
89
  title_prefix:
73
90
  description: |
74
91
  Add a prefix to the README title.