ci: move github label script under the github directory
What changed, and why it matters
This commit simply moves a helper shell script from one folder (contrib/) to another (.github/) and updates the path used by a GitHub Actions workflow. It does not change any project code, cryptographic logic, or how the software behaves for users. There is no security issue here.
No action required; this is a non-security organizational change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is a pure file relocation of gen_label_config.sh, used in CI to generate labeler configuration for pull requests. The script contents are identical; only the file path and the corresponding reference in .github/workflows/manage-pr.yml are updated. No executable code, dependencies, or workflow logic changed.
Changed components
.github/gen_label_config.sh.github/workflows/manage-pr.ymlInspect captured patch +38 / −38
diff --git a/.github/gen_label_config.sh b/.github/gen_label_config.sh
new file mode 100755
index 00000000..1527891f
--- /dev/null
+++ b/.github/gen_label_config.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+# Generates the label configuration using crates in the repository.
+# The label configuration is appended to the labeler config file.
+
+config=.github/labeler.yml
+
+# Define a default value for SCAN_DIR if not set
+: "${SCAN_DIR:=.}"
+
+if [ "${1:-default}" != "--force" ] && ! git diff --exit-code "$config";
+then
+ echo "Error: $config is not committed."
+ echo "Refusing to overwrite it to prevent disaster."
+ echo "Run the script with --force to override this."
+ exit 1
+fi
+
+excluded_crates="fuzz"
+
+CRATES="$(cd "$SCAN_DIR" && cargo metadata --no-deps --format-version 1 | jq -j -r '.packages | map(.manifest_path | rtrimstr("/Cargo.toml") | ltrimstr("'"$PWD"'/")) | join(" ")')"
+
+for crate in $CRATES;
+do
+ if echo "$crate" | grep -qE "$excluded_crates";
+ then
+ continue
+ fi
+
+ {
+ echo "C-$crate:"
+ echo " - changed-files:"
+ echo " - any-glob-to-any-file: $crate/**"
+ } >> "$config"
+done
diff --git a/.github/workflows/manage-pr.yml b/.github/workflows/manage-pr.yml
index 42c5236c..a61a9f83 100644
--- a/.github/workflows/manage-pr.yml
+++ b/.github/workflows/manage-pr.yml
@@ -22,7 +22,7 @@ jobs:
ref: "refs/pull/${{ github.event.number }}/merge"
persist-credentials: false
- name: Generate label config
- run: cd master && SCAN_DIR=../merge ./contrib/gen_label_config.sh
+ run: cd master && SCAN_DIR=../merge ./.github/gen_label_config.sh
- name: Update labels
uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0
with:
diff --git a/contrib/gen_label_config.sh b/contrib/gen_label_config.sh
deleted file mode 100755
index 1527891f..00000000
--- a/contrib/gen_label_config.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env bash
-
-set -euo pipefail
-
-# Generates the label configuration using crates in the repository.
-# The label configuration is appended to the labeler config file.
-
-config=.github/labeler.yml
-
-# Define a default value for SCAN_DIR if not set
-: "${SCAN_DIR:=.}"
-
-if [ "${1:-default}" != "--force" ] && ! git diff --exit-code "$config";
-then
- echo "Error: $config is not committed."
- echo "Refusing to overwrite it to prevent disaster."
- echo "Run the script with --force to override this."
- exit 1
-fi
-
-excluded_crates="fuzz"
-
-CRATES="$(cd "$SCAN_DIR" && cargo metadata --no-deps --format-version 1 | jq -j -r '.packages | map(.manifest_path | rtrimstr("/Cargo.toml") | ltrimstr("'"$PWD"'/")) | join(" ")')"
-
-for crate in $CRATES;
-do
- if echo "$crate" | grep -qE "$excluded_crates";
- then
- continue
- fi
-
- {
- echo "C-$crate:"
- echo " - changed-files:"
- echo " - any-glob-to-any-file: $crate/**"
- } >> "$config"
-done
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.