ci(renovate): track requirements.yml and allow its version bumps
Enable Renovate's ansible-galaxy manager for requirements.yml and let a bot pull request change only the version: lines of that file (check_bot_pr_diff.py), so a collection bump can automerge like the other pins while a changed name or source still fails the gate (#118). Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
This commit is contained in:
1 parent
8fb7148129
commit
87b23ea4f3
3 files changed
+26
No files matched your search
@@ -17,6 +17,7 @@ import check_bot_pr_diff as cbd
|
||||
D1, D2 = "sha256:" + "a" * 64, "sha256:" + "b" * 64
|
||||
FILES = {
|
||||
"requirements-dev.txt": "# pins\nansible-core==2.19.14\nreuse==6.2.0\n",
|
||||
"requirements.yml": "---\ncollections:\n - name: community.general\n version: 14.0.0\n",
|
||||
".pre-commit-config.yaml": "repos:\n - repo: https://github.com/x/y\n rev: v1.0.0\n hooks:\n - id: y\n",
|
||||
"images/ci/Dockerfile": f"FROM ubuntu:24.04@{D1} AS os\nRUN pip install uv==0.13.5 \\\n && echo hi\nRUN echo x\n",
|
||||
"images/molecule-ubuntu2404/Dockerfile": f"FROM ubuntu:24.04@{D1}\n",
|
||||
@@ -54,6 +55,7 @@ class RuleTest(unittest.TestCase):
|
||||
def test_allowed_edits(self):
|
||||
cases = [
|
||||
("requirements-dev.txt", "reuse==6.2.0", "reuse==6.3.0"),
|
||||
("requirements.yml", " version: 14.0.0", " version: 14.1.0"),
|
||||
(".pre-commit-config.yaml", " rev: v1.0.0", " rev: v1.1.0"),
|
||||
(
|
||||
"images/ci/Dockerfile",
|
||||
@@ -92,6 +94,17 @@ class RuleTest(unittest.TestCase):
|
||||
def test_refused_edits(self):
|
||||
cases = [
|
||||
("requirements-dev.txt", "reuse==6.2.0", "evil==1.0"),
|
||||
("requirements.yml", " version: 14.0.0", " version: '*'"),
|
||||
(
|
||||
"requirements.yml",
|
||||
" version: 14.0.0",
|
||||
" source: https://evil.example",
|
||||
),
|
||||
(
|
||||
"requirements.yml",
|
||||
" - name: community.general",
|
||||
" - name: evil.collection",
|
||||
),
|
||||
("requirements-dev.txt", "reuse==6.2.0", "reuse @ https://x/y.tgz"),
|
||||
(".pre-commit-config.yaml", " rev: v1.0.0", " repo: https://evil/x"),
|
||||
(
|
||||
|
||||
Reference in new issue
Block a user