diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 4dbfc2034..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 - -registries: - npm: - type: npm-registry - url: https://registry.npmjs.org - token: ${{secrets.NPM_TOKEN_PUBLIC_PUBLISH}} - -updates: - # Maintain dependencies for npm - - package-ecosystem: npm - directory: / - registries: - - npm - schedule: - interval: daily - commit-message: - # Prefix commit messages with "fix" (to trigger a release from semantic-versioning) - prefix: fix - # Prefix devDepedencies commits with "chore" (no release needed) - prefix-development: chore - include: scope - open-pull-requests-limit: 10 - ignore: - - dependency-name: "*" - update-types: ["version-update:semver-major"] - # Ignore Vue version updates until we're ready for Vue 3.3 - - dependency-name: "vue" - - # Maintain dependencies for GitHub Actions - - package-ecosystem: github-actions - directory: / - schedule: - interval: daily diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-approve.yaml similarity index 55% rename from .github/workflows/auto-merge.yml rename to .github/workflows/auto-approve.yaml index caf82c750..09a742aec 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-approve.yaml @@ -1,5 +1,5 @@ --- -name: Dependabot auto-merge +name: Renovate Bot dependency updates auto-merge permissions: pull-requests: write @@ -8,9 +8,9 @@ permissions: on: pull_request_target jobs: - dependabot-automerge: + renovate-autoapprove: runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} + if: ${{ github.actor == 'renovate[bot]' }} steps: - name: Approve a PR run: gh pr review --approve "$PR_URL" @@ -18,9 +18,3 @@ jobs: PR_URL: ${{ github.event.pull_request.html_url }} # Use the bot account PAT to allow auto-approve and merge the PRs GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }} - - - name: Enable auto-merge for Dependabot PRs - run: gh pr merge --auto --squash "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }} diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yaml similarity index 83% rename from .github/workflows/commitlint.yml rename to .github/workflows/commitlint.yaml index d9b613e84..f8c921f10 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yaml @@ -5,7 +5,7 @@ on: jobs: commitlint: - if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'flycode-app[bot]' }} + if: ${{ github.actor != 'renovate[bot]' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pr-closed.yml b/.github/workflows/pr-closed.yaml similarity index 100% rename from .github/workflows/pr-closed.yml rename to .github/workflows/pr-closed.yaml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yaml similarity index 96% rename from .github/workflows/publish.yml rename to .github/workflows/publish.yaml index 92ceaf657..06194876f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yaml @@ -2,7 +2,10 @@ name: Publish on: push: - branches: [main] + branches: + - main + - alpha + - beta jobs: run-tests: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yaml similarity index 93% rename from .github/workflows/test.yml rename to .github/workflows/test.yaml index 39faf1d79..25bd4aa48 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yaml @@ -2,7 +2,11 @@ name: Tests on: pull_request: - branches: [main] + branches: + - main + - alpha + - beta + # Allow workflow to be called by another workflow workflow_call: # Must define secrets here so that the calling workflow can pass in the NPM_TOKEN needed to install private packages. @@ -67,7 +71,8 @@ jobs: - name: Publish package preview id: package-preview - if: ${{ github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }} + # Do not run for `alpha` or `beta` branches + if: github.event_name == 'pull_request' && github.actor != 'renovate[bot]' && !contains(github.head_ref || github.ref_name, 'alpha') && !contains(github.head_ref || github.ref_name, 'beta') env: NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }} run: | diff --git a/commitlint.config.cjs b/commitlint.config.cjs index 0eba6bc8f..75847f64a 100644 --- a/commitlint.config.cjs +++ b/commitlint.config.cjs @@ -3,4 +3,5 @@ module.exports = { rules: { 'header-max-length': [2, 'always', 108], }, + ignores: [(message) => /^chore\(release\): .+$/m.test(message)], } diff --git a/lefthook.yml b/lefthook.yaml similarity index 100% rename from lefthook.yml rename to lefthook.yaml diff --git a/renovate.json b/renovate.json new file mode 100644 index 000000000..62f135061 --- /dev/null +++ b/renovate.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base", + ":semanticCommits", + ":automergeRequireAllStatusChecks", + ":automergePatch", + ":automergeMinor" + ], + "baseBranches": [ + "main" + ], + "dependencyDashboard": true, + "rangeStrategy": "bump", + "platformAutomerge": true, + "labels": [ + "dependencies", + "renovate-bot" + ], + "schedule": [ + "every weekday" + ], + "timezone": "America/New_York", + "automergeSchedule": [ + "every weekday" + ], + "npmrcMerge": true, + "encrypted": { + "npmToken": "wcFMA/xDdHCJBTolAQ//XFopBP9S7JuWKQTwVozdJvlVb+riW/S+U84WkQf66rxeJAqSnM3WgOK5PszWD7a84zb6FpOsr1YZTwVXBmkZBsQGQ4XUGCM+42Fs2etKSQHfUCLLGO3HDMAnz0s1Y2F3U6TbZzb2nsXwSNwyXHKSC6jK+wRvmUMs1z4uSQjhsldlb1q358oiIY7DSS2x9HzplltxSFeV2TfJdq3/AEwgPAJuaAV1+cAxiFAP2hwCY7goOTSx0OC39LHApiZgCoEJPYgdIbOtLyu5qmExenu1JUBNrt+3SNN9p7vXZiNcFcdIkZHoDmlwWdMyxOupqoxBvvlzTIVqqz16LA2k1s1P6e9SigKLv470v5KmnyMiXOk0h0GrR+fMnrq6GveZ7R9PToek1yRCwX4SAeAzLABFz4F3O2UXXQqQG/Q6SxmaGOcidIDEdXvbJ3NIcYbwPhPg0X12/vvFdDQpeSTJlOVlsy0+WIyENkfjtHN7WshzqTy2tGGacZWKeK7+qbjJAV7hKw366UlKhDHDSyRCa6zaHIIujEB/JKNgjhb/wiNy8LWzxyFhA8m/djjvnFlldzod+VbR3gM5aW1LXEEAlgzy3gfDQu0QaAhliqw5+Bx36zB20NXKTVcqZYKoa12p8mFoxGZmtMcunw0ZYHFQY6Ml+Yi4w81fMSwJh8OSYPVE0kLSbwE5f2wH72CFWu9XW4+y7yPhHhff+GRnmDkkyJSX8F4XI+OQJhNMJX0sJmO2X/RiKfz0IOLVP3YMj/NT9CUmdcAdyljjmvD1z9yZ/GNoe4XRa1I9kDN5SM782yJ8mlQlzxMX3JBaoyj5vz5GIKZdsg" + }, + "stabilityDays": 14, + "packageRules": [ + { + "matchPackagePatterns": [ + "^@kong\/", + "^@kong-ui\/", + "^@kong-ui-public\/" + ], + "stabilityDays": 0 + }, + { + "automerge": true, + "groupName": "all non-major dependencies with stable version", + "groupSlug": "all-minor-patch", + "matchCurrentVersion": "!/^0/", + "matchPackagePatterns": [ + "*" + ], + "matchUpdateTypes": [ + "minor", + "patch" + ], + "stabilityDays": 10 + } + ] +}