Repository navigation
feat(pre-commit): publish README generator hook #745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
98d30b3
feat: add pre-commit hook manifest
Jamie-BitFlight 546303b
fix: skip dev bootstrap for global installs
Jamie-BitFlight 7ee995b
docs: document pre-commit provider hook
Jamie-BitFlight a16d26d
test: smoke test published pre-commit hook
Jamie-BitFlight 5cb051c
test: exercise pre-commit hook from remote ref
Jamie-BitFlight 1ca17ef
fix: keep dev bootstrap out of git package preparation
Jamie-BitFlight c2c5b48
fix: use pre-commit tested Node runtime
Jamie-BitFlight 30461fb
chore: keep package lifecycle unchanged
Jamie-BitFlight 95721b1
fix: run pre-commit hook through provider wrapper
Jamie-BitFlight 060fc83
docs: describe pre-commit runtime requirement
Jamie-BitFlight 805b7b3
test: provide supported Node runtime to hook consumer
Jamie-BitFlight 2289902
feat: add pre-commit provider wrapper
Jamie-BitFlight 573c2f3
fix: use current pre-commit script language
Jamie-BitFlight e79bd58
fix: forward pre-commit hook arguments
Jamie-BitFlight 3e75f86
test: verify pre-commit hook arguments
Jamie-BitFlight e6284eb
ci: avoid persisting hook checkout credentials
Jamie-BitFlight 14cb4b6
docs: clarify pre-commit path support
Jamie-BitFlight dfbc0e8
docs: defer released-hook usage until publication
Jamie-BitFlight File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| - id: github-action-readme-generator | ||
| name: Generate GitHub Action README | ||
| description: Sync generated README sections from action.yml. | ||
| entry: scripts/pre-commit-hook.sh | ||
| language: unsupported_script | ||
| minimum_pre_commit_version: 4.4.0 | ||
| always_run: true | ||
| pass_filenames: false | ||
| stages: [pre-commit] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/bin/sh | ||
| set -eu | ||
|
|
||
| if ! command -v node >/dev/null 2>&1 || ! command -v npx >/dev/null 2>&1; then | ||
| echo "github-action-readme-generator pre-commit hook requires Node.js and npm/npx." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) | ||
| package_json="$script_dir/../package.json" | ||
| version=$(node -e 'const fs = require("node:fs"); const p = JSON.parse(fs.readFileSync(process.argv[1], "utf8")); process.stdout.write(p.version);' "$package_json") | ||
|
|
||
| exec npx --yes "github-action-readme-generator@$version" "$@" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.