From 2e47ce87e2208edf2271daee278b604a806e24d3 Mon Sep 17 00:00:00 2001 From: Filipe C Menezes Date: Tue, 8 Apr 2025 09:55:25 +0100 Subject: [PATCH 1/5] ci: add github actions to check dist folder --- .github/workflows/code_health.yaml | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/code_health.yaml diff --git a/.github/workflows/code_health.yaml b/.github/workflows/code_health.yaml new file mode 100644 index 000000000..57c33da7f --- /dev/null +++ b/.github/workflows/code_health.yaml @@ -0,0 +1,38 @@ +--- +name: Code Health +on: + push: + branches: + - main + pull_request: +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: GitHubSecurityLab/actions-permissions/monitor@v1 + with: + config: ${{ vars.PERMISSIONS_CONFIG }} + - name: Checkout repository + uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + - name: install dependencies + run: | + npm ci + - name: build + run: | + npm run build + - name: Check for uncommitted files + run: | + export FILES= + FILES=$(git ls-files -o -m --directory --exclude-standard --no-empty-directory) + export LINES= + LINES=$(echo "$FILES" | awk 'NF' | wc -l) + if [ "$LINES" -ne 0 ]; then + echo "Detected files that need to be committed:" + echo "${FILES//^/ }" + echo "" + echo "Try running: npm run build" + exit 1 + fi From 4b2bd0842402fe22c7bfc6993e9d8695263f7963 Mon Sep 17 00:00:00 2001 From: Filipe C Menezes Date: Tue, 8 Apr 2025 09:58:48 +0100 Subject: [PATCH 2/5] fix: readme --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index 1c6e28bfd..e060b270a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,3 @@ -<<<<<<< HEAD -# atlas-mcp-server - -TBD -======= # Atlas MCP Server PoC A Model Context Protocol server for interacting with MongoDB Atlas. @@ -144,4 +139,3 @@ Step 3: Launch Claude Desktop and click on the hammer icon, the Demo MCP server Note: If you make changes to your MCP server code, rebuild the project with `npm run build` and restart the server and Claude Desktop. ->>>>>>> 1599834 (chore: adds docs written by filipe into readme) From 525d6398a51df31783abcb4fdd5e449eb2007781 Mon Sep 17 00:00:00 2001 From: Filipe C Menezes Date: Tue, 8 Apr 2025 10:01:01 +0100 Subject: [PATCH 3/5] fix: echo --- .github/workflows/code_health.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_health.yaml b/.github/workflows/code_health.yaml index 57c33da7f..9fed1af82 100644 --- a/.github/workflows/code_health.yaml +++ b/.github/workflows/code_health.yaml @@ -31,7 +31,7 @@ jobs: LINES=$(echo "$FILES" | awk 'NF' | wc -l) if [ "$LINES" -ne 0 ]; then echo "Detected files that need to be committed:" - echo "${FILES//^/ }" + echo "${FILES}" echo "" echo "Try running: npm run build" exit 1 From 5b930bc17c58dfc9d50a63511706043d48f49f2d Mon Sep 17 00:00:00 2001 From: Filipe C Menezes Date: Tue, 8 Apr 2025 10:24:59 +0100 Subject: [PATCH 4/5] ci: prettier --- .github/workflows/code_health.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/code_health.yaml b/.github/workflows/code_health.yaml index 9fed1af82..7fbdbd684 100644 --- a/.github/workflows/code_health.yaml +++ b/.github/workflows/code_health.yaml @@ -36,3 +36,23 @@ jobs: echo "Try running: npm run build" exit 1 fi + prettier: + name: Prettier Check + runs-on: ubuntu-latest + steps: + - uses: GitHubSecurityLab/actions-permissions/monitor@v1 + with: + config: ${{ vars.PERMISSIONS_CONFIG }} + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Run Prettier + id: prettier-run + uses: rutajdash/prettier-cli-action@v1.0.0 + with: + config_path: ./.prettierrc.yml + - name: Prettier Output + if: ${{ failure() }} + shell: bash + run: | + echo "The following files are not formatted:" + echo "${{steps.prettier-run.outputs.prettier_output}}" \ No newline at end of file From 7a0864acaaed6fed5334a40d18181a71e6758117 Mon Sep 17 00:00:00 2001 From: Filipe C Menezes Date: Tue, 8 Apr 2025 10:28:22 +0100 Subject: [PATCH 5/5] fix --- .github/workflows/code_health.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_health.yaml b/.github/workflows/code_health.yaml index 7fbdbd684..4e36b0a92 100644 --- a/.github/workflows/code_health.yaml +++ b/.github/workflows/code_health.yaml @@ -47,7 +47,7 @@ jobs: uses: actions/checkout@v2 - name: Run Prettier id: prettier-run - uses: rutajdash/prettier-cli-action@v1.0.0 + uses: rutajdash/prettier-cli-action@d42c4325a3b344f3bd4be482bc34de521998d557 with: config_path: ./.prettierrc.yml - name: Prettier Output