diff --git a/.github/renovate.json b/.github/renovate.json index b10b48b..d38851f 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,11 +1,5 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:best-practices", - ":semanticCommits" - ], - "gitAuthor": "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>", - "minimumReleaseAge": "14 days", "customManagers": [ { "customType": "regex", @@ -21,17 +15,5 @@ "matchStrings": ["github:(?[\\w-]+/[\\w-]+)/(?[a-f0-9]+).*#\\s*(?v[\\S]+)"], "datasourceTemplate": "github-releases" } - ], - "packageRules": [ - { - "matchUpdateTypes": ["minor", "patch", "digest"], - "groupName": "non-major dependencies", - "groupSlug": "non-major" - }, - { - "matchUpdateTypes": ["major"], - "groupName": "major dependencies", - "groupSlug": "major" - } ] } diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml deleted file mode 100644 index 3329711..0000000 --- a/.github/workflows/renovate.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Managed by copier — changes may be overwritten by `copier update` -name: Renovate - -on: - workflow_dispatch: - schedule: - - cron: "0 3 * * 1" # weekly, Monday at 03:00 UTC - -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - renovate: - runs-on: ubuntu-latest - permissions: - contents: write # Allow Renovate to create branches - issues: write # Allow Renovate Dependency Dashboard - pull-requests: write # Allow Renovate to create PRs - timeout-minutes: 30 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - - uses: renovatebot/github-action@abd08c7549b2a864af5df4a2e369c43f035a6a9d # v46.1.5 - with: - configurationFile: .github/renovate.json - token: ${{ secrets.RENOVATE_TOKEN }} - env: - RENOVATE_REPOSITORIES: ${{ github.repository }} diff --git a/template/.github/renovate.json.jinja b/template/.github/renovate.json.jinja index a7cb9f8..47c39f1 100644 --- a/template/.github/renovate.json.jinja +++ b/template/.github/renovate.json.jinja @@ -1,24 +1,7 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:best-practices", - ":semanticCommits" - ], - "gitAuthor": "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>", - "minimumReleaseAge": "14 days", + "$schema": "https://docs.renovatebot.com/renovate-schema.json"{% if _is_template %}, "customManagers": [ {% include pathjoin("includes", "renovate-template.jinja") ignore missing %} - ], - "packageRules": [ - { - "matchUpdateTypes": ["minor", "patch", "digest"], - "groupName": "non-major dependencies", - "groupSlug": "non-major" - }, - { - "matchUpdateTypes": ["major"], - "groupName": "major dependencies", - "groupSlug": "major" - } ] +{% endif %} } diff --git a/template/.github/workflows/renovate.yaml b/template/.github/workflows/renovate.yaml deleted file mode 100644 index 3329711..0000000 --- a/template/.github/workflows/renovate.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Managed by copier — changes may be overwritten by `copier update` -name: Renovate - -on: - workflow_dispatch: - schedule: - - cron: "0 3 * * 1" # weekly, Monday at 03:00 UTC - -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - renovate: - runs-on: ubuntu-latest - permissions: - contents: write # Allow Renovate to create branches - issues: write # Allow Renovate Dependency Dashboard - pull-requests: write # Allow Renovate to create PRs - timeout-minutes: 30 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - - uses: renovatebot/github-action@abd08c7549b2a864af5df4a2e369c43f035a6a9d # v46.1.5 - with: - configurationFile: .github/renovate.json - token: ${{ secrets.RENOVATE_TOKEN }} - env: - RENOVATE_REPOSITORIES: ${{ github.repository }} diff --git a/tests/test_rendering.py b/tests/test_rendering.py index 11bcb06..7d8bd7f 100644 --- a/tests/test_rendering.py +++ b/tests/test_rendering.py @@ -249,17 +249,11 @@ def test_pr_checks_pinned_actions(generated_github_project): def test_renovate_config_valid_json(generated_github_project): - """renovate.json is valid JSON with expected keys.""" + """renovate.json is valid JSON with $schema (khepri-managed, minimal config).""" data = parse_json(generated_github_project / ".github" / "renovate.json") - assert "extends" in data - assert "customManagers" in data - - -def test_renovate_no_template_config(generated_github_project): - """Default projects don't have template-specific Renovate managers.""" - content = (generated_github_project / ".github" / "renovate.json").read_text() - assert "postUpgradeTasks" not in content - assert "template/" not in content + assert "$schema" in data + assert "extends" not in data + assert "customManagers" not in data def test_security_md(generated_github_project):