-
Notifications
You must be signed in to change notification settings - Fork 1.7k
v2: Add left-hook pre-push
#1003
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
Open
KKonstantinov
wants to merge
13
commits into
modelcontextprotocol:main
Choose a base branch
from
KKonstantinov:feature/ts-sdk-hooks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+175
−0
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
407245e
add lefthook - lint fix, code format, build and test pre-commit, auto…
KKonstantinov 36e760a
Merge branch 'main' into feature/ts-sdk-hooks
KKonstantinov 1b5319e
move pre-commit to pre-push
KKonstantinov 06a7f5b
Merge branch 'feature/ts-sdk-hooks' of github.com:KKonstantinov/types…
KKonstantinov b01e2ee
Merge branch 'main' of github.com:modelcontextprotocol/typescript-sdk…
KKonstantinov 91989fc
lefthook merge commit
KKonstantinov 03ad73e
lefthook merge commit
KKonstantinov b2794f9
lefthook merge commit
KKonstantinov 20fb7fb
lefthook merge commit
KKonstantinov ac71aa8
merge commit
KKonstantinov ca5bb57
Merge branch 'main' into feature/ts-sdk-hooks
KKonstantinov 2607add
lefthook merge commit
KKonstantinov adf92ca
Merge branch 'feature/ts-sdk-hooks' of github.com:KKonstantinov/types…
KKonstantinov 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,3 +52,5 @@ dist/ | |
|
|
||
| # Conformance test results | ||
| results/ | ||
|
|
||
| .lefthook-local.yml | ||
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,24 @@ | ||
| # Optional local lefthook configuration | ||
| # To enable this: | ||
| # cp lefthook-local.example.yml lefthook-local.yml | ||
|
|
||
| pre-commit: | ||
| parallel: true | ||
| jobs: | ||
| - name: 'Typecheck' | ||
| run: pnpm typecheck:all | ||
| stage_fixed: true | ||
|
|
||
| - name: 'Lint Fix & Format' | ||
| run: pnpm lint:fix:all | ||
| stage_fixed: true | ||
|
|
||
| post-checkout: | ||
| jobs: | ||
| - name: 'Install Dependencies' | ||
| run: pnpm install | ||
|
|
||
| post-merge: | ||
| jobs: | ||
| - name: 'Install Dependencies' | ||
| run: pnpm install |
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,47 @@ | ||
| # lefthook.yml | ||
| # Configuration reference: https://lefthook.dev/configuration/ | ||
|
|
||
| assert_lefthook_installed: true | ||
|
|
||
| output: | ||
| - meta # Print lefthook version | ||
| - summary # Print summary block (successful and failed steps) | ||
| - empty_summary # Print summary heading when there are no steps to run | ||
| - success # Print successful steps | ||
| - failure # Print failed steps printing | ||
| - execution # Print any execution logs (but prints if the execution failed) | ||
| - execution_out # Print execution output (but still prints failed commands output) | ||
| - execution_info # Print `EXECUTE > ...` logging | ||
| - skips # Print "skip" (i.e. no files matched) | ||
|
|
||
| pre-push: | ||
| follow: true | ||
| parallel: true | ||
| jobs: | ||
| - name: 'Typecheck' | ||
| run: pnpm run typecheck:all | ||
| fail_text: | | ||
| 💡 To catch typechecking issues earlier, enable the pre-commit hook: | ||
| cp lefthook-local.example.yml lefthook-local.yml | ||
|
|
||
| - name: 'Lint' | ||
| run: pnpm run lint:all | ||
| fail_text: | | ||
| 💡 To catch linting issues earlier, enable the pre-commit hook: | ||
| cp lefthook-local.example.yml lefthook-local.yml | ||
|
|
||
| - name: 'Build' | ||
| run: pnpm run build:all | ||
| fail_text: | | ||
| 💡 To catch build issues earlier, enable the pre-commit hook: | ||
| cp lefthook-local.example.yml lefthook-local.yml | ||
|
|
||
| post-checkout: | ||
| jobs: | ||
| - name: 'Install Dependencies' | ||
| run: pnpm install | ||
|
|
||
| post-merge: | ||
| jobs: | ||
| - name: 'Install Dependencies' | ||
| run: pnpm install |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't match the example - the example says
lefthook-local.ymlbut here it has adotprepended.lefthook-local.yml