Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/add-netlify-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Add Netlify Links To Changed Pages
on:
workflow_call:
pull_request_target:
paths-ignore:
- "source/**/*.ast"
jobs:
get-pr-changes:
name: Get Changed Files & Update PR Description
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/osiris-subpar-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Coverage Check for Osiris Generated AST files
on:
pull_request:
paths:
- '**/*.ast' # Only trigger if .ast files are changed
branches:
- main
- DOP-5399-CB

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
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
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 Osiris
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
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
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 }}
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
2 changes: 2 additions & 0 deletions .github/workflows/vale-tdbx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
pull_request:
paths:
- "source/**"
paths-ignore:
- "source/**/*.ast"

jobs:
vale:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ giza.log
.vscode*
*.swp
*.code-workspace

# GitHub Actions
.secrets
event.json
39 changes: 39 additions & 0 deletions osiris.toml
Original file line number Diff line number Diff line change
@@ -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/"
Loading