From 9e3293651360fa873b6c2261c9a8ca4e91c93694 Mon Sep 17 00:00:00 2001
From: Patrice Chalin <chalin@users.noreply.github.com>
Date: Fri, 8 Nov 2024 14:47:32 -0500
Subject: [PATCH] [CI] build-dev skip registry check and check-links tweak
 (#5569)

---
 .github/workflows/build-dev.yml          | 2 +-
 .github/workflows/check-links.yml        | 5 +++++
 .github/workflows/pr-actions.yml         | 6 +++---
 .warnings-skip-list.txt                  | 1 +
 content/fr/docs/what-is-opentelemetry.md | 4 ----
 package.json                             | 8 ++++----
 6 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/build-dev.yml b/.github/workflows/build-dev.yml
index 619082f90927..79b89a7d2c01 100644
--- a/.github/workflows/build-dev.yml
+++ b/.github/workflows/build-dev.yml
@@ -37,7 +37,7 @@ jobs:
 
       - run: npm run log:test-and-fix
         env:
-          CMD_SKIP: i18n
+          CMD_SKIP: i18n|registry
           PIN_SKIP: ${{ inputs.submodule_path_regex }}
 
       - uses: actions/upload-artifact@v4
diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml
index 9654de10f61e..ebf94483c8a9 100644
--- a/.github/workflows/check-links.yml
+++ b/.github/workflows/check-links.yml
@@ -34,6 +34,11 @@ jobs:
       - run: npm install --omit=optional
       - run: npm run log:check:links
         continue-on-error: true
+      - name: Any files need updating?
+        run: |
+          git restore package.json
+          echo "If the following fails, then either run 'npm run fix:htmltest-config' locally or '/fix:htmltest-config' in GitHub"
+          npm run _diff:fail
       - uses: actions/upload-artifact@v4
         with:
           name: build-log-etc
diff --git a/.github/workflows/pr-actions.yml b/.github/workflows/pr-actions.yml
index 9a9bf1c7b725..d0c36fc24460 100644
--- a/.github/workflows/pr-actions.yml
+++ b/.github/workflows/pr-actions.yml
@@ -29,9 +29,9 @@ jobs:
       - name: Extract action name
         id: extract_action_name
         run: |
-          PR_ACTION=$(echo $COMMENT | grep -oP '/fix:\K\w+')
+          PR_ACTION=$(echo $COMMENT | grep -oP '/fix:\K[-_0-9a-z]+')
           echo "Action is $PR_ACTION"
-          ACTION_NAMES="all|dict|filenames|format|i18n|markdown|refcache|submodules?|text"
+          ACTION_NAMES="all|dict|filenames|format|htmltest-config|i18n|markdown|refcache|submodules?|text"
           if [[ ! "$PR_ACTION" =~ ^($ACTION_NAMES)$ ]]; then
             echo "Invalid action name: $PR_ACTION"
             echo "Action name should be one of: $ACTION_NAMES"
@@ -72,7 +72,7 @@ jobs:
             all|refcache)
               npm install --omit=optional
               ;&
-            dict|filenames|format|markdown|submodule*)
+            dict|filenames|format|htmltest-config|markdown|submodule*)
               npm run fix:$PR_ACTION
               ;;
           esac
diff --git a/.warnings-skip-list.txt b/.warnings-skip-list.txt
index e69de29bb2d1..32b3143e5f78 100644
--- a/.warnings-skip-list.txt
+++ b/.warnings-skip-list.txt
@@ -0,0 +1 @@
+_filename-error
diff --git a/content/fr/docs/what-is-opentelemetry.md b/content/fr/docs/what-is-opentelemetry.md
index 1b99672c56c5..fb61b00e40f1 100644
--- a/content/fr/docs/what-is-opentelemetry.md
+++ b/content/fr/docs/what-is-opentelemetry.md
@@ -3,10 +3,6 @@ title: Qu'est-ce qu'OpenTelemetry ?
 description:
   Une brève explication de ce qu'est OpenTelemetry, et de ce qu'il n'est pas.
 weight: 150
-htmltest:
-  IgnoreDirs:
-    # TODO drop next lines after https://github.com/open-telemetry/opentelemetry.io/issues/5555 is fixed for these pages:
-    - ^fr/docs/concepts/glossary/
 default_lang_commit: 71833a5f8b84110dadf1e98604b87a900724ac33
 ---
 
diff --git a/package.json b/package.json
index d80d5b389e92..04b4d4723c33 100644
--- a/package.json
+++ b/package.json
@@ -55,9 +55,9 @@
     "check:text": "npm run _check:text -- ",
     "check": "npm run seq -- $(npm run -s _list:check:*)",
     "clean": "make clean",
-    "code-excerpts": "rm -Rf tmp/excerpts/* && npm run seq -- code-excerpts:get code-excerpts:update-docs",
     "code-excerpts:get": "cd tools && dart run build_runner build --delete-conflicting-outputs --output ../tmp/excerpts",
     "code-excerpts:update-docs": "cd tools && dart run code_excerpt_updater --fragment-dir-path ../tmp/excerpts --src-dir-path examples --yaml --write-in-place content",
+    "code-excerpts": "rm -Rf tmp/excerpts/* && npm run seq -- code-excerpts:get code-excerpts:update-docs",
     "cp:spec": "scripts/content-modules/cp-pages.sh",
     "diff:check": "npm run _diff:check || (echo; echo 'WARNING: the files above have not been committed'; echo)",
     "diff:fail": "npm run _diff:check || (echo; echo 'ERROR: the files above have changed. Locally rerun `npm run test-and-fix` and commit changes'; echo; exit 1)",
@@ -65,6 +65,7 @@
     "fix:dict": "find content/en layouts -name \"*.md\" -print0 | xargs -0 scripts/normalize-cspell-front-matter.pl",
     "fix:filenames": "npm run _rename-to-kebab-case",
     "fix:format": "npm run format",
+    "fix:htmltest-config": "scripts/htmltest-config.sh",
     "fix:i18n:all": "scripts/check-i18n.sh -a -c HEAD",
     "fix:i18n:drifted": "scripts/check-i18n.sh -c HEAD",
     "fix:i18n:new": "scripts/check-i18n.sh -n -c HEAD",
@@ -87,8 +88,8 @@
     "prebuild:preview": "npm run _prebuild",
     "prebuild:production": "npm run _prebuild",
     "prebuild": "npm run _prebuild",
-    "precheck:links:internal": "npm run build && npm run update:htmltest-config",
-    "precheck:links": "npm run build && npm run update:htmltest-config",
+    "precheck:links:internal": "npm run build && npm run fix:htmltest-config",
+    "precheck:links": "npm run build && npm run fix:htmltest-config",
     "prefix:submodule": "npm run update:submodule",
     "prepare": "npm run seq -- get:submodule _prepare:docsy",
     "preserve:hugo": "npm run _prebuild",
@@ -100,7 +101,6 @@
     "serve": "npm run serve:hugo --",
     "test-and-fix": "npm run seq -- fix:submodule $(npm -s run _list:fix:for-test-and-fix) $(npm -s run _list:check:for-test-and-fix)",
     "test": "npm run check",
-    "update:htmltest-config": "scripts/htmltest-config.sh",
     "update:pkg:hugo": "npm install --save-dev --save-exact hugo-extended@latest",
     "update:pkgs": "npx npm-check-updates -u",
     "update:submodule": "set -x && git submodule update --remote ${DEPTH:- --depth 999}"