Skip to content

CLOUDP-317123 change markup for code blocks in Atlas CLI generated docs #4006

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

Merged
merged 9 commits into from
Jun 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
@@ -268,8 +268,25 @@ jobs:
with:
config: ${{ vars.PERMISSIONS_CONFIG }}
- uses: actions/checkout@v4
- name: Install ShellCheck
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
- name: Run ShellCheck
uses: bewuethr/shellcheck-action@d01912909579c4b1a335828b8fca197fbb8e0aa4
run: |
# Find all shell scripts excluding specific patterns or directories
# Add exclusions by adding more -not -path patterns as needed
find . -name "*.sh" \
-not -path "./.git/*" \
-not -path "./docs/*" \
-print0 | xargs -0 shellcheck --format=gcc
# Also check for shell scripts without .sh extension
find . -type f -exec grep -l '^#!/bin/\(ba\)\?sh' {} \; \
| grep -v '\.sh$' \
| grep -v './.git/' \
| grep -v './docs/' \
| xargs -r shellcheck --format=gcc
tidy:
runs-on: ubuntu-latest
steps:
1 change: 1 addition & 0 deletions build/ci/check-licenses.sh
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ find_files() {
find . -not \( \
\( \
-wholename '*mock*' \
-o -wholename '*docs*' \
-o -wholename '*third_party*' \
\) -prune \
\) \
6 changes: 4 additions & 2 deletions build/ci/copy.bara.sky.template
Original file line number Diff line number Diff line change
@@ -23,9 +23,10 @@ core.workflow(
integrates = [],
),
origin_files = glob(["docs/command/**"], exclude = ["docs/command/atlas-completion**"]),
destination_files = glob(["source/includes/command/**"], exclude=["source/includes/command/atlas-kubernetes**"]),
destination_files = glob(["source/includes/command/**" ,"source/includes/examples/**"], exclude=["source/includes/command/atlas-kubernetes**"]),
authoring = authoring.pass_thru(author),
transformations = [
core.move("docs/command/includes", "source/includes/examples"),
core.move("docs/command", "source/includes/command"),
core.rename(".txt", ".rst", suffix = True)
],
@@ -46,9 +47,10 @@ core.workflow(
integrates = [],
),
origin_files = glob(["docs/command/**"]),
destination_files = glob(["content/atlas-cli/current/source/command/**"], exclude=["content/atlas-cli/current/source/command/atlas-api", "content/atlas-cli/current/source/command/atlas-kubernetes**"]),
destination_files = glob(["content/atlas-cli/current/source/command/**", "content/atlas-cli/current/source/includes/examples/**"], exclude=["content/atlas-cli/current/source/command/atlas-api", "content/atlas-cli/current/source/command/atlas-kubernetes**"]),
authoring = authoring.pass_thru(author),
transformations = [
core.move("docs/command/includes", "content/atlas-cli/current/source/includes/examples"),
core.move("docs/command", "content/atlas-cli/current/source/command"),
],
)
6 changes: 6 additions & 0 deletions build/ci/evergreen.yml
Original file line number Diff line number Diff line change
@@ -499,9 +499,15 @@ functions:
shell: bash
script: |
set -Eeou pipefail
if [[ -z "${triggered_by_git_tag}" ]]; then
REF="${github_commit}"
else
REF="${triggered_by_git_tag}"
fi
cat <<EOF > expansions.yaml
home: $HOME
tag: $(git tag --list 'atlascli/v*' --sort=-taggerdate | head -1)
ref: $REF
version: $(git tag --list 'atlascli/v*' --sort=-taggerdate | head -1 | cut -d 'v' -f 2)
EOF
- command: expansions.update
7 changes: 5 additions & 2 deletions build/ci/release.yml
Original file line number Diff line number Diff line change
@@ -323,7 +323,7 @@ functions:
<<: *go_options
env:
<<: *go_env
TAG: ${tag}
TAG: ${ref}
GH_TOKEN: ${gh_token}
WORKFLOW: ${workflow}
EVERGREEN_USER: ${evergreen_user}
@@ -529,7 +529,10 @@ buildvariants:
- name: package_goreleaser
- name: copybara
display_name: "Copybara"
git_tag_only: true
depends_on:
- name: package_goreleaser
variant: release_atlascli_github
patch_optional: true
tags:
- foliage_health
run_on:
5 changes: 3 additions & 2 deletions build/ci/run-copybara.sh
Original file line number Diff line number Diff line change
@@ -65,17 +65,18 @@ docker run \
-v "${PWD}/.gitconfig:/root/.gitconfig" \
-v "${PWD}/.git-credentials:/root/.git-credentials" \
-e "COPYBARA_WORKFLOW=$WORKFLOW" \
-e "COPYBARA_OPTIONS=--github-api-bearer-auth true" \
-e "COPYBARA_OPTIONS=--github-api-bearer-auth true --force" \
google/copybara

PR_URL=$(docker logs copybara-container 2>&1 | grep "/pull/" | sed -E 's/^.*(https\:[^\ ]+).*$/\1/')

rm -rf .git-credentials .gitconfig copy.bara.sky
docker rm -f copybara-container

echo "Created PR: $PR_URL"

TARGET="$DOCS_SLACK_CHANNEL"
MSG="Hey team :wave: ${PR_URL} is ready for review :thankyou:"
echo "{\"target\":\"$TARGET\",\"msg\":\"$MSG\"}"
curl --header "Api-User:${EVERGREEN_USER:?}" \
--header "Api-Key:${EVERGREEN_API_KEY:?}" \
--request POST "https://evergreen.mongodb.com/rest/v2/notifications/slack" \
Original file line number Diff line number Diff line change
@@ -120,9 +120,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api accessTracking listAccessLogsByClusterName --version 2023-01-01 --clusterName [clusterName] --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-accessTracking-listAccessLogsByClusterName-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -120,9 +120,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api accessTracking listAccessLogsByHostname --version 2023-01-01 --groupId 32b6e34b3d91647abb20e7b8 --hostname [hostname]

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-accessTracking-listAccessLogsByHostname-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -103,9 +103,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api alertConfigurations deleteAlertConfiguration --version 2023-01-01 --alertConfigId 32b6e34b3d91647abb20e7b8 --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-alertConfigurations-deleteAlertConfiguration-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -103,9 +103,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api alertConfigurations getAlertConfiguration --version 2023-01-01 --alertConfigId 32b6e34b3d91647abb20e7b8 --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-alertConfigurations-getAlertConfiguration-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -111,9 +111,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api alertConfigurations listAlertConfigurations --version 2023-01-01 --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-alertConfigurations-listAlertConfigurations-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -115,9 +115,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api alertConfigurations listAlertConfigurationsByAlertId --version 2023-01-01 --alertId [alertId] --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-alertConfigurations-listAlertConfigurationsByAlertId-2023-01-01-default.sh
:language: shell
8 changes: 2 additions & 6 deletions docs/command/atlas-api-alerts-getAlert.txt
Original file line number Diff line number Diff line change
@@ -103,9 +103,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api alerts getAlert --version 2023-01-01 --alertId [alertId] --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-alerts-getAlert-2023-01-01-default.sh
:language: shell
8 changes: 2 additions & 6 deletions docs/command/atlas-api-alerts-listAlerts.txt
Original file line number Diff line number Diff line change
@@ -115,9 +115,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api alerts listAlerts --version 2023-01-01 --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-alerts-listAlerts-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -115,9 +115,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api alerts listAlertsByAlertConfigurationId --version 2023-01-01 --alertConfigId 32b6e34b3d91647abb20e7b8 --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-alerts-listAlertsByAlertConfigurationId-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -106,9 +106,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api atlasSearch deleteAtlasSearchDeployment --version 2023-01-01 --clusterName [clusterName] --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-atlasSearch-deleteAtlasSearchDeployment-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -104,9 +104,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api atlasSearch deleteAtlasSearchIndex --version 2024-05-30 --clusterName [clusterName] --groupId 32b6e34b3d91647abb20e7b8 --indexId [indexId]

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-atlasSearch-deleteAtlasSearchIndex-2024-05-30-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -112,9 +112,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api atlasSearch deleteAtlasSearchIndexByName --version 2024-05-30 --clusterName [clusterName] --collectionName [collectionName] --databaseName [databaseName] --groupId 32b6e34b3d91647abb20e7b8 --indexName [indexName]

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-atlasSearch-deleteAtlasSearchIndexByName-2024-05-30-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -104,9 +104,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api atlasSearch deleteAtlasSearchIndexDeprecated --version 2023-01-01 --clusterName [clusterName] --groupId 32b6e34b3d91647abb20e7b8 --indexId [indexId]

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-atlasSearch-deleteAtlasSearchIndexDeprecated-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -98,9 +98,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api atlasSearch getAtlasSearchDeployment --version 2025-03-12 --clusterName [clusterName] --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-atlasSearch-getAtlasSearchDeployment-2025-03-12-default.sh
:language: shell
8 changes: 2 additions & 6 deletions docs/command/atlas-api-atlasSearch-getAtlasSearchIndex.txt
Original file line number Diff line number Diff line change
@@ -104,9 +104,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api atlasSearch getAtlasSearchIndex --version 2024-05-30 --clusterName [clusterName] --groupId 32b6e34b3d91647abb20e7b8 --indexId [indexId]

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-atlasSearch-getAtlasSearchIndex-2024-05-30-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -112,9 +112,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api atlasSearch getAtlasSearchIndexByName --version 2024-05-30 --clusterName [clusterName] --collectionName [collectionName] --databaseName [databaseName] --groupId 32b6e34b3d91647abb20e7b8 --indexName [indexName]

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-atlasSearch-getAtlasSearchIndexByName-2024-05-30-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -104,9 +104,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api atlasSearch getAtlasSearchIndexDeprecated --version 2023-01-01 --clusterName [clusterName] --groupId 32b6e34b3d91647abb20e7b8 --indexId [indexId]

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-atlasSearch-getAtlasSearchIndexDeprecated-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -108,9 +108,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api atlasSearch listAtlasSearchIndexes --version 2024-05-30 --clusterName [clusterName] --collectionName [collectionName] --databaseName [databaseName] --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-atlasSearch-listAtlasSearchIndexes-2024-05-30-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -100,9 +100,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api atlasSearch listAtlasSearchIndexesCluster --version 2024-05-30 --clusterName [clusterName] --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-atlasSearch-listAtlasSearchIndexesCluster-2024-05-30-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -108,9 +108,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api atlasSearch listAtlasSearchIndexesDeprecated --version 2023-01-01 --clusterName [clusterName] --collectionName [collectionName] --databaseName [databaseName] --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-atlasSearch-listAtlasSearchIndexesDeprecated-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -96,9 +96,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api auditing getAuditingConfiguration --version 2023-01-01 --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-auditing-getAuditingConfiguration-2023-01-01-default.sh
:language: shell
8 changes: 2 additions & 6 deletions docs/command/atlas-api-awsClustersDns-getAwsCustomDns.txt
Original file line number Diff line number Diff line change
@@ -96,9 +96,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api awsClustersDns getAwsCustomDns --version 2023-01-01 --groupId 32b6e34b3d91647abb20e7b8

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-awsClustersDns-getAwsCustomDns-2023-01-01-default.sh
:language: shell
Original file line number Diff line number Diff line change
@@ -104,9 +104,5 @@ Inherited Options
Examples
--------

.. code-block::

atlas api cloudBackups cancelBackupRestoreJob --version 2023-01-01 --clusterName [clusterName] --groupId 32b6e34b3d91647abb20e7b8 --restoreJobId [restoreJobId]

.. Code end marker, please don't delete this comment

.. literalinclude:: /includes/examples/atlas-api-cloudBackups-cancelBackupRestoreJob-2023-01-01-default.sh
:language: shell
Loading