From 199efe7acc6699aff5c9a714d51fc46d551cf03a Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Thu, 27 Feb 2025 16:47:37 -0500 Subject: [PATCH 01/10] =?UTF-8?q?=F0=9F=91=B7=20DOP-5399=20adds=20Osiris?= =?UTF-8?q?=20Coverage=20GHA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/osiris-subpar-coverage.yml | 116 +++++++++++++++++++ .gitignore | 4 + osiris.toml | 39 +++++++ 3 files changed, 159 insertions(+) create mode 100644 .github/workflows/osiris-subpar-coverage.yml create mode 100644 osiris.toml diff --git a/.github/workflows/osiris-subpar-coverage.yml b/.github/workflows/osiris-subpar-coverage.yml new file mode 100644 index 000000000..5c4428530 --- /dev/null +++ b/.github/workflows/osiris-subpar-coverage.yml @@ -0,0 +1,116 @@ +name: Coverage Check for Osiris Generated AST files +on: + pull_request: + paths: + - '**/*.ast' # Only trigger if .ast files are changed + branches: + - main + - DOP-5399 + workflow_dispatch: + +jobs: + check-coverage: + runs-on: ubuntu-latest + outputs: + site_coverage_list: ${{ steps.set_coverage.outputs.site_coverage_list }} + coverage_below_threshold: ${{ steps.set_coverage.outputs.coverage_below_threshold }} + + steps: + - name: Checkout Repos + uses: actions/checkout@v4 + + - name: Install Wget + run: sudo apt-get update && sudo apt-get install -y wget + + - name: Clone Docs Java + run: git clone --branch DOP-5399 https://github.com/mongodb/docs-java.git cloned-docs-java-repo + + - name: Clone Osiris + run: git clone https://x-access-token:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/10gen/osiris.git cloned-osiris-repo + + - name: Run Coverage Check + id: run_coverage + run: | + cd cloned-osiris-repo + npm ci + COVERAGE_OUTPUT=$(npm run dev -- -c "$GITHUB_WORKSPACE/cloned-docs-java-repo" -v --sp 95) + + REQUIRED_COVERAGE=100.0 + + # Extract all Average Coverage values below the threshold + SITE_COVERAGE_LIST=$(echo "$COVERAGE_OUTPUT" | awk -v threshold=$REQUIRED_COVERAGE ' + /Average Coverage:/ { + coverage = $3 + 0; + if (coverage < threshold) { + low_coverage_detected = 1; + last_coverage = coverage; + } else { + low_coverage_detected = 0; + } + } + /Finished processing site "/ { + if (low_coverage_detected) { + site = $4; + gsub(/"/, "", site); # Extract site name + print site ":" last_coverage; # Store as site:coverage + } + } + ' | paste -sd ',' - ) + + # Print detected values + echo "Detected Coverage Below Threshold: $SITE_COVERAGE_LIST" + + echo "Required Coverage: $REQUIRED_COVERAGE" + + # Check if SITE_COVERAGE_LIST is empty or not + if [ -n "$SITE_COVERAGE_LIST" ]; then + echo "Test coverage is below the required threshold ($REQUIRED_COVERAGE%)." + echo "coverage_below_threshold=true" >> $GITHUB_ENV + echo "SITE_COVERAGE_LIST=$SITE_COVERAGE_LIST" >> $GITHUB_ENV + else + echo "Test coverage meets the required threshold." + echo "coverage_below_threshold=false" >> $GITHUB_ENV + fi + + - name: Set Workflow Outputs + id: set_coverage + run: | + echo "coverage_below_threshold=${coverage_below_threshold}" >> $GITHUB_OUTPUT + echo "site_coverage_list=${SITE_COVERAGE_LIST}" >> $GITHUB_OUTPUT + + send-slack-notification: + runs-on: ubuntu-latest + needs: check-coverage + if: needs.check-coverage.outputs.coverage_below_threshold == 'true' + + steps: + - name: Send Slack Notification + env: + SITE_COVERAGE_LIST: ${{ needs.check-coverage.outputs.site_coverage_list }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + REPOSITORY: ${{ github.repository }} + PR_TITLE: ${{ github.event.pull_request.title }} + PR_NUMBER: ${{ github.event.pull_request.number }} + PR_URL: ${{ github.event.pull_request.html_url }} + PR_SHA: ${{ github.event.pull_request.head.sha }} + run: | + TEXT_MESSAGE="⚠️ *Test Coverage Alert* ⚠️\n\nThe test coverage is below the required threshold of 90%.\n\n*Sites with Low Coverage:* \n" + + IFS=',' read -r -a SITE_COVERAGE_ARRAY <<< "$SITE_COVERAGE_LIST" + + for item in "${SITE_COVERAGE_ARRAY[@]}"; do + site_name="${item%%:*}" + coverage_value="${item##*:}" + TEXT_MESSAGE+="• ${site_name}: ${coverage_value}%\n" + done + + TEXT_MESSAGE+="\n*Repository:* \n" + TEXT_MESSAGE+="*PR Title:* $PR_TITLE\n" + TEXT_MESSAGE+="*PR Number:* #$PR_NUMBER\n" + TEXT_MESSAGE+="*PR URL:* <$PR_URL|View PR>\n" + TEXT_MESSAGE+="*Commit SHA:* \`$PR_SHA\`\n\n" + TEXT_MESSAGE+="Please review the test coverage and take action if necessary." + + curl -v -X POST -H 'Content-type: application/json' \ + --data '{"text": "'"$TEXT_MESSAGE"'"}' \ + $SLACK_WEBHOOK_URL \ No newline at end of file diff --git a/.gitignore b/.gitignore index 49c66f9d2..2a4b4a887 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,7 @@ giza.log .vscode* *.swp *.code-workspace + +# GitHub Actions +.secrets +event.json \ No newline at end of file diff --git a/osiris.toml b/osiris.toml new file mode 100644 index 000000000..5fd8fcd3c --- /dev/null +++ b/osiris.toml @@ -0,0 +1,39 @@ +[[sites]] +name = "java-sync" +url = "https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-sync/index.html" +site_type = "java" +source_dir = "source" +output = "api-documentation/java-sync" + +[sites.href_mapping] +"*//mongodb.github.io/mongo-java-driver/*/apidocs/mongodb-driver-sync/" = "/api-documentation/java-sync/" + +[[sites]] +name = "core" +url = "https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-core/index.html" +site_type = "java" +source_dir = "source" +output = "api-documentation/core" + +[sites.href_mapping] +"*//mongodb.github.io/mongo-java-driver/*/apidocs/mongodb-driver-core/" = "/api-documentation/core/" + +[[sites]] +name = "scala" +url = "https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongo-scala-driver/index.html" +site_type = "scala" +source_dir = "source" +output = "api-documentation/scala" + +[sites.href_mapping] +"*//mongodb.github.io/mongo-java-driver/*/apidocs/mongo-scala-driver/" = "/api-documentation/scala/" + +[[sites]] +name = "kotlin" +url = "https://mongodb.github.io/mongo-java-driver/5.3/apidocs/mongodb-driver-kotlin-sync/index.html" +site_type = "kotlin" +source_dir = "source" +output = "api-documentation/kotlin" + +[sites.href_mapping] +"*//mongodb.github.io/mongo-java-driver/*/apidocs/mongodb-driver-kotlin-sync/" = "/api-documentation/kotlin/" \ No newline at end of file From 6e595a71accffede58468f515afd1c3935424784 Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Thu, 27 Feb 2025 16:55:59 -0500 Subject: [PATCH 02/10] =?UTF-8?q?=F0=9F=8E=A8=20DOP-5399=20points=20to=20t?= =?UTF-8?q?he=20correct=20branhc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/osiris-subpar-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osiris-subpar-coverage.yml b/.github/workflows/osiris-subpar-coverage.yml index 5c4428530..80ac2df92 100644 --- a/.github/workflows/osiris-subpar-coverage.yml +++ b/.github/workflows/osiris-subpar-coverage.yml @@ -23,7 +23,7 @@ jobs: run: sudo apt-get update && sudo apt-get install -y wget - name: Clone Docs Java - run: git clone --branch DOP-5399 https://github.com/mongodb/docs-java.git cloned-docs-java-repo + run: git clone --branch DOP-5399-CB https://github.com/mongodb/docs-java.git cloned-docs-java-repo - name: Clone Osiris run: git clone https://x-access-token:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/10gen/osiris.git cloned-osiris-repo From 2cbc4eeb1bf980a643b48c75888a835ab6d922c4 Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Thu, 27 Feb 2025 16:56:36 -0500 Subject: [PATCH 03/10] =?UTF-8?q?=F0=9F=8E=A8=20DOP-5399=20points=20to=20t?= =?UTF-8?q?he=20correct=20branch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/osiris-subpar-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osiris-subpar-coverage.yml b/.github/workflows/osiris-subpar-coverage.yml index 80ac2df92..b6ee0c901 100644 --- a/.github/workflows/osiris-subpar-coverage.yml +++ b/.github/workflows/osiris-subpar-coverage.yml @@ -35,7 +35,7 @@ jobs: npm ci COVERAGE_OUTPUT=$(npm run dev -- -c "$GITHUB_WORKSPACE/cloned-docs-java-repo" -v --sp 95) - REQUIRED_COVERAGE=100.0 + REQUIRED_COVERAGE=90.0 # Extract all Average Coverage values below the threshold SITE_COVERAGE_LIST=$(echo "$COVERAGE_OUTPUT" | awk -v threshold=$REQUIRED_COVERAGE ' From 35aed1a529e364a01ccdc17ddb45d5b64a246707 Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Thu, 27 Feb 2025 17:05:04 -0500 Subject: [PATCH 04/10] =?UTF-8?q?=F0=9F=94=A7=20DOP-5399=20updates=20to=20?= =?UTF-8?q?point=20to=20the=20working=20branch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/osiris-subpar-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osiris-subpar-coverage.yml b/.github/workflows/osiris-subpar-coverage.yml index b6ee0c901..d06c0766e 100644 --- a/.github/workflows/osiris-subpar-coverage.yml +++ b/.github/workflows/osiris-subpar-coverage.yml @@ -5,7 +5,7 @@ on: - '**/*.ast' # Only trigger if .ast files are changed branches: - main - - DOP-5399 + - DOP-5399-CB workflow_dispatch: jobs: From 9ff88acebb814de5b6a78a43421ae4405413de86 Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Thu, 27 Feb 2025 17:17:50 -0500 Subject: [PATCH 05/10] =?UTF-8?q?=F0=9F=94=A7=20DOP-5399=20temp=20set=20th?= =?UTF-8?q?e=20required=20threshold?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/osiris-subpar-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/osiris-subpar-coverage.yml b/.github/workflows/osiris-subpar-coverage.yml index d06c0766e..7d98d3f96 100644 --- a/.github/workflows/osiris-subpar-coverage.yml +++ b/.github/workflows/osiris-subpar-coverage.yml @@ -35,7 +35,7 @@ jobs: npm ci COVERAGE_OUTPUT=$(npm run dev -- -c "$GITHUB_WORKSPACE/cloned-docs-java-repo" -v --sp 95) - REQUIRED_COVERAGE=90.0 + REQUIRED_COVERAGE=100.0 # Extract all Average Coverage values below the threshold SITE_COVERAGE_LIST=$(echo "$COVERAGE_OUTPUT" | awk -v threshold=$REQUIRED_COVERAGE ' From 932ed330fc6c005c49d6707e8e7dab2c80f9a96b Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Fri, 28 Feb 2025 14:18:39 -0500 Subject: [PATCH 06/10] =?UTF-8?q?=F0=9F=94=A7=20DOP-5399=20uses=20actions/?= =?UTF-8?q?checkout=20method=20and=20removed=20dup=20cloning=20approach?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/osiris-subpar-coverage.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/osiris-subpar-coverage.yml b/.github/workflows/osiris-subpar-coverage.yml index 7d98d3f96..5c2cc58c9 100644 --- a/.github/workflows/osiris-subpar-coverage.yml +++ b/.github/workflows/osiris-subpar-coverage.yml @@ -18,13 +18,18 @@ jobs: steps: - name: Checkout Repos uses: actions/checkout@v4 + with: + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + fetch-depth: 0 + ref: DOP-5399-CB + + - name: Verify Branch Checkout + run: | + git branch --show-current # Print the current branch - name: Install Wget run: sudo apt-get update && sudo apt-get install -y wget - - name: Clone Docs Java - run: git clone --branch DOP-5399-CB https://github.com/mongodb/docs-java.git cloned-docs-java-repo - - name: Clone Osiris run: git clone https://x-access-token:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/10gen/osiris.git cloned-osiris-repo @@ -33,7 +38,7 @@ jobs: run: | cd cloned-osiris-repo npm ci - COVERAGE_OUTPUT=$(npm run dev -- -c "$GITHUB_WORKSPACE/cloned-docs-java-repo" -v --sp 95) + COVERAGE_OUTPUT=$(npm run dev -- -c "$GITHUB_WORKSPACE" -v --sp 95) REQUIRED_COVERAGE=100.0 From 5e4457c636af3a7e93e1bfb65f066b2de687d060 Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Fri, 28 Feb 2025 14:23:13 -0500 Subject: [PATCH 07/10] =?UTF-8?q?=F0=9F=94=A7=20DOP-5399=20removes=20the?= =?UTF-8?q?=20workflow=5Fdispatch=20event=20from=20the=20yaml=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/osiris-subpar-coverage.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/osiris-subpar-coverage.yml b/.github/workflows/osiris-subpar-coverage.yml index 5c2cc58c9..c4a84cc7d 100644 --- a/.github/workflows/osiris-subpar-coverage.yml +++ b/.github/workflows/osiris-subpar-coverage.yml @@ -6,7 +6,6 @@ on: branches: - main - DOP-5399-CB - workflow_dispatch: jobs: check-coverage: From 6733cdf68089f2795e38da3c96055d2bbf0d01b1 Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Mon, 3 Mar 2025 11:23:48 -0500 Subject: [PATCH 08/10] =?UTF-8?q?=F0=9F=94=A7=20Value=20and=20add-netlify-?= =?UTF-8?q?links=20ignores=20ast=20files=20and=20osiris=20action=20uses=20?= =?UTF-8?q?the=20bot=20token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/add-netlify-links.yml | 2 + .github/workflows/osiris-subpar-coverage.yml | 80 ++++---------------- .github/workflows/vale-tdbx.yml | 2 + 3 files changed, 20 insertions(+), 64 deletions(-) diff --git a/.github/workflows/add-netlify-links.yml b/.github/workflows/add-netlify-links.yml index ed24310d0..0d1cc6ddb 100644 --- a/.github/workflows/add-netlify-links.yml +++ b/.github/workflows/add-netlify-links.yml @@ -2,6 +2,8 @@ name: Add Netlify Links To Changed Pages on: workflow_call: pull_request_target: + paths-ignore: + - "**.ast" jobs: get-pr-changes: name: Get Changed Files & Update PR Description diff --git a/.github/workflows/osiris-subpar-coverage.yml b/.github/workflows/osiris-subpar-coverage.yml index c4a84cc7d..7a4bea964 100644 --- a/.github/workflows/osiris-subpar-coverage.yml +++ b/.github/workflows/osiris-subpar-coverage.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout Repos uses: actions/checkout@v4 with: - token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + token: ${{ secrets.API_TOKEN_GITHUB }} fetch-depth: 0 ref: DOP-5399-CB @@ -30,51 +30,14 @@ jobs: run: sudo apt-get update && sudo apt-get install -y wget - name: Clone Osiris - run: git clone https://x-access-token:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/10gen/osiris.git cloned-osiris-repo + run: git clone https://x-access-token:${{ secrets.API_TOKEN_GITHUB }}@github.com/10gen/osiris.git cloned-osiris-repo - name: Run Coverage Check id: run_coverage - run: | - cd cloned-osiris-repo - npm ci - COVERAGE_OUTPUT=$(npm run dev -- -c "$GITHUB_WORKSPACE" -v --sp 95) - - REQUIRED_COVERAGE=100.0 - - # Extract all Average Coverage values below the threshold - SITE_COVERAGE_LIST=$(echo "$COVERAGE_OUTPUT" | awk -v threshold=$REQUIRED_COVERAGE ' - /Average Coverage:/ { - coverage = $3 + 0; - if (coverage < threshold) { - low_coverage_detected = 1; - last_coverage = coverage; - } else { - low_coverage_detected = 0; - } - } - /Finished processing site "/ { - if (low_coverage_detected) { - site = $4; - gsub(/"/, "", site); # Extract site name - print site ":" last_coverage; # Store as site:coverage - } - } - ' | paste -sd ',' - ) - - # Print detected values - echo "Detected Coverage Below Threshold: $SITE_COVERAGE_LIST" - - echo "Required Coverage: $REQUIRED_COVERAGE" - - # Check if SITE_COVERAGE_LIST is empty or not - if [ -n "$SITE_COVERAGE_LIST" ]; then - echo "Test coverage is below the required threshold ($REQUIRED_COVERAGE%)." - echo "coverage_below_threshold=true" >> $GITHUB_ENV - echo "SITE_COVERAGE_LIST=$SITE_COVERAGE_LIST" >> $GITHUB_ENV - else - echo "Test coverage meets the required threshold." - echo "coverage_below_threshold=false" >> $GITHUB_ENV - fi + uses: mongodb/docs-worker-actions/coverage-check@DOP-5399 + with: + repo-path: cloned-osiris-repo + required-coverage: '100' - name: Set Workflow Outputs id: set_coverage @@ -97,24 +60,13 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} PR_URL: ${{ github.event.pull_request.html_url }} PR_SHA: ${{ github.event.pull_request.head.sha }} - run: | - TEXT_MESSAGE="⚠️ *Test Coverage Alert* ⚠️\n\nThe test coverage is below the required threshold of 90%.\n\n*Sites with Low Coverage:* \n" - - IFS=',' read -r -a SITE_COVERAGE_ARRAY <<< "$SITE_COVERAGE_LIST" - - for item in "${SITE_COVERAGE_ARRAY[@]}"; do - site_name="${item%%:*}" - coverage_value="${item##*:}" - TEXT_MESSAGE+="• ${site_name}: ${coverage_value}%\n" - done - - TEXT_MESSAGE+="\n*Repository:* \n" - TEXT_MESSAGE+="*PR Title:* $PR_TITLE\n" - TEXT_MESSAGE+="*PR Number:* #$PR_NUMBER\n" - TEXT_MESSAGE+="*PR URL:* <$PR_URL|View PR>\n" - TEXT_MESSAGE+="*Commit SHA:* \`$PR_SHA\`\n\n" - TEXT_MESSAGE+="Please review the test coverage and take action if necessary." - - curl -v -X POST -H 'Content-type: application/json' \ - --data '{"text": "'"$TEXT_MESSAGE"'"}' \ - $SLACK_WEBHOOK_URL \ No newline at end of file + uses: mongodb/docs-worker-actions/coverage-report-to-slack@DOP-5399 + with: + required-coverage: '100' + site-coverage-list: $SITE_COVERAGE_LIST + slack-webhook-url: $SLACK_WEBHOOK_URL + repository: $REPOSITORY + pr-title: $PR_TITLE + pr-number: $PR_NUMBER + pr-url: $PR_URL + pr-sha: $PR_SHA \ No newline at end of file diff --git a/.github/workflows/vale-tdbx.yml b/.github/workflows/vale-tdbx.yml index d748e941c..74c4d5bd3 100644 --- a/.github/workflows/vale-tdbx.yml +++ b/.github/workflows/vale-tdbx.yml @@ -3,6 +3,8 @@ on: pull_request: paths: - "source/**" + paths-ignored: + - "**.ast" jobs: vale: From de41ed0037fbb09624591849eea9ed450407a2e8 Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Mon, 3 Mar 2025 11:40:03 -0500 Subject: [PATCH 09/10] =?UTF-8?q?=F0=9F=94=A7=20DOP-5399=20ignores=20ast?= =?UTF-8?q?=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/add-netlify-links.yml | 2 +- .github/workflows/vale-tdbx.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/add-netlify-links.yml b/.github/workflows/add-netlify-links.yml index 0d1cc6ddb..2e9eca919 100644 --- a/.github/workflows/add-netlify-links.yml +++ b/.github/workflows/add-netlify-links.yml @@ -3,7 +3,7 @@ on: workflow_call: pull_request_target: paths-ignore: - - "**.ast" + - "source/**/*.ast" jobs: get-pr-changes: name: Get Changed Files & Update PR Description diff --git a/.github/workflows/vale-tdbx.yml b/.github/workflows/vale-tdbx.yml index 74c4d5bd3..a6763d09e 100644 --- a/.github/workflows/vale-tdbx.yml +++ b/.github/workflows/vale-tdbx.yml @@ -3,8 +3,8 @@ on: pull_request: paths: - "source/**" - paths-ignored: - - "**.ast" + paths-ignore: + - "source/**/*.ast" jobs: vale: From ea395d1acc5cbbbb2dfae065ae544a52da5a8daa Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Tue, 11 Mar 2025 13:24:30 -0400 Subject: [PATCH 10/10] =?UTF-8?q?=E2=9C=A8=20DOP-5399=20remove=20the=20osi?= =?UTF-8?q?ris.toml=20file=20along=20with=20removing=20all=20test=20branch?= =?UTF-8?q?es=20and=20params?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/osiris-subpar-coverage.yml | 17 ++++----- osiris.toml | 39 -------------------- 2 files changed, 8 insertions(+), 48 deletions(-) delete mode 100644 osiris.toml diff --git a/.github/workflows/osiris-subpar-coverage.yml b/.github/workflows/osiris-subpar-coverage.yml index 7a4bea964..1169b07ed 100644 --- a/.github/workflows/osiris-subpar-coverage.yml +++ b/.github/workflows/osiris-subpar-coverage.yml @@ -5,7 +5,6 @@ on: - '**/*.ast' # Only trigger if .ast files are changed branches: - main - - DOP-5399-CB jobs: check-coverage: @@ -17,10 +16,10 @@ jobs: steps: - name: Checkout Repos uses: actions/checkout@v4 - with: - token: ${{ secrets.API_TOKEN_GITHUB }} - fetch-depth: 0 - ref: DOP-5399-CB + # uncomment when running or testing locally using [act](https://github.com/nektos/act?tab=readme-ov-file) + # with: + # token: ${{ secrets.API_TOKEN_GITHUB }} + # ref: DOP-5399-placeholder - name: Verify Branch Checkout run: | @@ -34,10 +33,10 @@ jobs: - name: Run Coverage Check id: run_coverage - uses: mongodb/docs-worker-actions/coverage-check@DOP-5399 + uses: mongodb/docs-worker-actions/coverage-check@main with: repo-path: cloned-osiris-repo - required-coverage: '100' + required-coverage: '90' - name: Set Workflow Outputs id: set_coverage @@ -60,9 +59,9 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} PR_URL: ${{ github.event.pull_request.html_url }} PR_SHA: ${{ github.event.pull_request.head.sha }} - uses: mongodb/docs-worker-actions/coverage-report-to-slack@DOP-5399 + uses: mongodb/docs-worker-actions/coverage-report-to-slack@main with: - required-coverage: '100' + required-coverage: '90' site-coverage-list: $SITE_COVERAGE_LIST slack-webhook-url: $SLACK_WEBHOOK_URL repository: $REPOSITORY diff --git a/osiris.toml b/osiris.toml deleted file mode 100644 index 5fd8fcd3c..000000000 --- a/osiris.toml +++ /dev/null @@ -1,39 +0,0 @@ -[[sites]] -name = "java-sync" -url = "https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-sync/index.html" -site_type = "java" -source_dir = "source" -output = "api-documentation/java-sync" - -[sites.href_mapping] -"*//mongodb.github.io/mongo-java-driver/*/apidocs/mongodb-driver-sync/" = "/api-documentation/java-sync/" - -[[sites]] -name = "core" -url = "https://mongodb.github.io/mongo-java-driver/5.2/apidocs/mongodb-driver-core/index.html" -site_type = "java" -source_dir = "source" -output = "api-documentation/core" - -[sites.href_mapping] -"*//mongodb.github.io/mongo-java-driver/*/apidocs/mongodb-driver-core/" = "/api-documentation/core/" - -[[sites]] -name = "scala" -url = "https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongo-scala-driver/index.html" -site_type = "scala" -source_dir = "source" -output = "api-documentation/scala" - -[sites.href_mapping] -"*//mongodb.github.io/mongo-java-driver/*/apidocs/mongo-scala-driver/" = "/api-documentation/scala/" - -[[sites]] -name = "kotlin" -url = "https://mongodb.github.io/mongo-java-driver/5.3/apidocs/mongodb-driver-kotlin-sync/index.html" -site_type = "kotlin" -source_dir = "source" -output = "api-documentation/kotlin" - -[sites.href_mapping] -"*//mongodb.github.io/mongo-java-driver/*/apidocs/mongodb-driver-kotlin-sync/" = "/api-documentation/kotlin/" \ No newline at end of file