mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
ci: preserve policy self-exclusion at the root path
This commit is contained in:
1 parent
b82fec109a
commit
7c3c4c899e
2 files changed
+9
-1
No files matched your search
@@ -86,6 +86,14 @@ class PortTests(unittest.TestCase):
|
||||
control_head = git("rev-parse", "HEAD").decode().strip()
|
||||
self.assertIn(b".github/workflows/block-test.yml\0", run("post-merge-review-changed.sh", docs, control_head))
|
||||
self.assertTrue(run("docs-only-scope.sh", base, control_head).startswith(b"run "))
|
||||
checker = root / ".github/block/scripts/public-text-check.sh"
|
||||
checker.parent.mkdir(parents=True)
|
||||
checker.write_text("pattern='disk" + "station'\n")
|
||||
git("add", ".github"); git("commit", "-m", "checker pattern")
|
||||
pattern_head = git("rev-parse", "HEAD").decode().strip()
|
||||
title, body = root / "title.txt", root / "body.txt"
|
||||
title.write_text("CI scope"); body.write_text("Checker patterns")
|
||||
self.assertEqual(run("public-text-check.sh", control_head, pattern_head, str(title), str(body)), b"public-text: clean\n")
|
||||
|
||||
|
||||
def test_safe_merge_refuses_wrong_head_base_and_incomplete_jobs(self):
|
||||
|
||||
@@ -32,7 +32,7 @@ report() { # report WHERE < matching lines
|
||||
git diff --relative --no-color --no-renames -U0 "$mb" "$head" -- . \
|
||||
':(exclude).github/scripts/public-text-check.sh' ':(exclude).github/scripts/public-text-check-test.sh'
|
||||
if [ -n "$(git rev-parse --show-prefix)" ]; then
|
||||
git -C "$(git rev-parse --show-toplevel)" diff --no-color --no-renames -U0 "$mb" "$head" -- '.github/workflows/block-*.yml' '.github/dockerfiles/block-*.Dockerfile' '.github/block/**'
|
||||
git -C "$(git rev-parse --show-toplevel)" diff --no-color --no-renames -U0 "$mb" "$head" -- '.github/workflows/block-*.yml' '.github/dockerfiles/block-*.Dockerfile' '.github/block/**' ':(exclude).github/block/scripts/public-text-check.sh'
|
||||
fi
|
||||
} |
|
||||
awk '
|
||||
|
||||
Reference in new issue
Block a user