-
Notifications
You must be signed in to change notification settings - Fork 5
chore(template): sync from mcp-ecosystem #12
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Dependabot auto-merge | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - reopened | ||
| - synchronize | ||
| - ready_for_review | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| auto-merge: | ||
| if: github.actor == 'dependabot[bot]' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Fetch Dependabot metadata | ||
| id: meta | ||
| uses: dependabot/fetch-metadata@v2 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Approve and enable auto-merge | ||
| if: | | ||
| steps.meta.outputs.update-type != 'version-update:semver-major' || | ||
| steps.meta.outputs.package-ecosystem == 'github_actions' | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| run: | | ||
| CURRENT_LOGIN="$(gh api user --jq .login)" | ||
| ALREADY_APPROVED="$(gh api "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews" --jq '[.[] | select(.user.login == "'"$CURRENT_LOGIN"'" and .state == "APPROVED")] | length')" | ||
| if [ "$ALREADY_APPROVED" -eq 0 ]; then | ||
| gh pr review --approve "$PR_URL" | ||
| fi | ||
| gh pr merge --auto --squash "$PR_URL" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: PR Title | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - edited | ||
| - reopened | ||
| - synchronize | ||
|
|
||
| permissions: | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| conventional-pr-title: | ||
| if: ${{ github.event.pull_request.base.ref == 'main' }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Validate conventional PR title | ||
| env: | ||
| PR_TITLE: ${{ github.event.pull_request.title }} | ||
| run: | | ||
| pattern='^(feat|fix|docs|chore|refactor|test|perf|build|ci|revert)(\([[:alnum:]_.-]+\))?!?: .+' | ||
|
|
||
| if [[ "$PR_TITLE" =~ $pattern ]]; then | ||
| echo "PR title is valid: $PR_TITLE" | ||
| exit 0 | ||
| fi | ||
|
|
||
| echo "PR title must use Conventional Commits because squash merges become release-please input." | ||
| echo "Allowed prefixes: feat, fix, docs, chore, refactor, test, perf, build, ci, revert" | ||
| echo "Examples:" | ||
| echo " fix: harden push approval auth flow" | ||
| echo " feat(auth): add TOTP support" | ||
| exit 1 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -15,8 +15,13 @@ | |||||
| # chore/docs: no version bump | ||||||
| # | ||||||
| # npm Publishing: | ||||||
| # Uses Trusted Publishing (OIDC) - no secrets needed! | ||||||
| # Uses Trusted Publishing (OIDC) - no NPM_TOKEN needed! | ||||||
| # Requires Node 24+ for npm 11.5.1+ OIDC support. | ||||||
| # Configure at: https://www.npmjs.com/package/@verygoodplugins/mcp-{name}/access | ||||||
| # | ||||||
| # RELEASE_PLEASE_TOKEN: | ||||||
| # Uses org-level PAT so the Release PR triggers CI workflows. | ||||||
| # PRs created by GITHUB_TOKEN don't trigger other workflows (GitHub security). | ||||||
|
|
||||||
| name: Release Please | ||||||
|
|
||||||
|
|
@@ -39,12 +44,15 @@ jobs: | |||||
| - uses: googleapis/release-please-action@v4 | ||||||
| id: release | ||||||
| with: | ||||||
| release-type: node | ||||||
| manifest-file: ".release-please-manifest.json" | ||||||
| config-file: "release-please-config.json" | ||||||
| token: ${{ secrets.RELEASE_PLEASE_TOKEN }} | ||||||
|
||||||
| token: ${{ secrets.RELEASE_PLEASE_TOKEN }} | |
| token: ${{ secrets.RELEASE_PLEASE_TOKEN || github.token }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "semi": true, | ||
| "singleQuote": true, | ||
| "trailingComma": "all", | ||
| "tabWidth": 2, | ||
| "trailingComma": "es5", | ||
| "printWidth": 100 | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,26 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // ESLint flat config for VGP MCP servers | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Requires: eslint ^9.0.0, typescript-eslint ^8.0.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import eslint from '@eslint/js'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import tseslint from 'typescript-eslint'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export default tseslint.config( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| eslint.configs.recommended, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ...tseslint.configs.recommended, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| files: ['src/**/*.ts'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rules: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // MCP stdio servers must not write to stdout outside the protocol. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'no-console': ['error', { allow: ['error', 'warn'] }], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Allow unused vars prefixed with underscore | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '@typescript-eslint/no-unused-vars': [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'error', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Allow explicit any in some cases (MCP tools often need flexibility) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '@typescript-eslint/no-explicit-any': 'warn', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ignores: ['dist/', 'node_modules/', '**/*.js', '**/*.mjs', '**/*.cjs'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+26
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // ESLint flat config for VGP MCP servers | |
| // Requires: eslint ^9.0.0, typescript-eslint ^8.0.0 | |
| import eslint from '@eslint/js'; | |
| import tseslint from 'typescript-eslint'; | |
| export default tseslint.config( | |
| eslint.configs.recommended, | |
| ...tseslint.configs.recommended, | |
| { | |
| files: ['src/**/*.ts'], | |
| rules: { | |
| // MCP stdio servers must not write to stdout outside the protocol. | |
| 'no-console': ['error', { allow: ['error', 'warn'] }], | |
| // Allow unused vars prefixed with underscore | |
| '@typescript-eslint/no-unused-vars': [ | |
| 'error', | |
| { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, | |
| ], | |
| // Allow explicit any in some cases (MCP tools often need flexibility) | |
| '@typescript-eslint/no-explicit-any': 'warn', | |
| }, | |
| }, | |
| { | |
| ignores: ['dist/', 'node_modules/', '**/*.js', '**/*.mjs', '**/*.cjs'], | |
| } | |
| ); | |
| // Delegate to the repository's authoritative ESLint flat config. | |
| import config from './eslint.config.js'; | |
| export default config; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -56,17 +56,17 @@ | |||||
| "mysql2": "^3.6.5" | ||||||
| }, | ||||||
| "devDependencies": { | ||||||
| "@eslint/js": "^9.39.2", | ||||||
| "@types/node": "^18.0.0", | ||||||
| "@eslint/js": "^9.18.0", | ||||||
| "@types/node": "^22.10.5", | ||||||
| "@typescript-eslint/eslint-plugin": "^8.50.1", | ||||||
| "@typescript-eslint/parser": "^8.50.1", | ||||||
| "eslint": "^9.39.0", | ||||||
| "eslint-config-prettier": "^10.1.0", | ||||||
| "eslint": "^9.18.0", | ||||||
| "eslint-config-prettier": "^10.0.1", | ||||||
| "eslint-plugin-unused-imports": "^4.3.0", | ||||||
| "globals": "^16.0.0", | ||||||
| "prettier": "^3.7.4", | ||||||
| "tsx": "^4.21.0", | ||||||
| "typescript": "^5.9.3", | ||||||
| "typescript-eslint": "^8.50.1" | ||||||
| "prettier": "^3.4.2", | ||||||
| "tsx": "^4.19.2", | ||||||
| "typescript": "^5.7.3", | ||||||
| "typescript-eslint": "^8.20.0" | ||||||
|
Comment on lines
+59
to
+70
|
||||||
| "typescript-eslint": "^8.20.0" | |
| "typescript-eslint": "^8.50.1" |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||||||||||||||||||||||||||||||||
| import { defineConfig } from 'vitest/config'; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| export default defineConfig({ | ||||||||||||||||||||||||||||||||||||
| test: { | ||||||||||||||||||||||||||||||||||||
| globals: true, | ||||||||||||||||||||||||||||||||||||
| environment: 'node', | ||||||||||||||||||||||||||||||||||||
| coverage: { | ||||||||||||||||||||||||||||||||||||
| provider: 'v8', | ||||||||||||||||||||||||||||||||||||
| reporter: ['text', 'json', 'html'], | ||||||||||||||||||||||||||||||||||||
| exclude: ['node_modules/', 'dist/', 'tests/', '*.config.*'], | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+13
|
||||||||||||||||||||||||||||||||||||
| import { defineConfig } from 'vitest/config'; | |
| export default defineConfig({ | |
| test: { | |
| globals: true, | |
| environment: 'node', | |
| coverage: { | |
| provider: 'v8', | |
| reporter: ['text', 'json', 'html'], | |
| exclude: ['node_modules/', 'dist/', 'tests/', '*.config.*'], | |
| }, | |
| }, | |
| }); | |
| // Vitest configuration was removed because the repository does not declare | |
| // the required Vitest dependencies or invoke Vitest from its test scripts. | |
| // Leaving a live `vitest.config.ts` in place would be misleading. | |
| export {}; |
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.
release-please-actionis configured to usemanifest-fileandconfig-file, but neither.release-please-manifest.jsonnorrelease-please-config.jsonexists in the repository. This will cause the workflow to fail at runtime; add these files (or revert torelease-type: nodeconfig) before merging.