Skip to content

Commit

Permalink
chore: versioning prep (#1681)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdehaven authored Sep 7, 2023
1 parent 1848b37 commit df01f80
Showing 12 changed files with 93 additions and 45 deletions.
29 changes: 0 additions & 29 deletions .github/dependabot.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Dependabot auto-approve
name: Renovate Bot dependency updates auto-merge

permissions:
pull-requests: write
@@ -8,19 +8,13 @@ permissions:
on: pull_request_target

jobs:
dependabot-autoapprove:
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"
env:
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 }}
Original file line number Diff line number Diff line change
@@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ main, 'release/**' ]
branches: [ main, alpha, beta, 'release/**' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main, 'release/**' ]
branches: [ main, alpha, beta, 'release/**' ]
schedule:
- cron: '36 7 * * 6'

21 changes: 21 additions & 0 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint Commit Messages

on:
pull_request:

jobs:
commitlint:
if: ${{ github.actor != 'renovate[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# See https://github.com/wagoid/commitlint-github-action/issues/560
- name: Remove tsconfig
run: rm tsconfig.json

- uses: wagoid/commitlint-github-action@v5.4.3
with:
configFile: commitlint.config.cjs
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -4,17 +4,19 @@ on:
push:
branches:
- main
- alpha
- beta

jobs:
get-changed-files:
name: Get Changed Files
uses: ./.github/workflows/get-changed-files.yml
uses: ./.github/workflows/get-changed-files.yaml

run-tests:
name: Tests
needs:
- get-changed-files
uses: ./.github/workflows/test.yml
uses: ./.github/workflows/test.yaml
# Must pass in secrets here so that the calling workflow can pass in the NPM_TOKEN needed to install private packages.
secrets:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
5 changes: 4 additions & 1 deletion .github/workflows/test.yml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@ on:
pull_request:
branches:
- main
- alpha
- beta

# Allow calling manually from GitHub
workflow_dispatch:
@@ -59,7 +61,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')
run: |
git config user.email "konnectx-engineers+kongponents-bot@konghq.com"
git config user.name "Kong UI Bot"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

---

[![Publish](https://github.com/Kong/kongponents/actions/workflows/publish.yml/badge.svg)](https://github.com/Kong/kongponents/actions/workflows/publish.yml)
[![Publish](https://github.com/Kong/kongponents/actions/workflows/publish.yaml/badge.svg)](https://github.com/Kong/kongponents/actions/workflows/publish.yaml)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

Kongponents is a Vue component library of frequently needed UI elements. They were developed to solve [Kong's](https://konghq.com) application needs, but are generic enough to use in any web application.
1 change: 1 addition & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -4,5 +4,6 @@ module.exports = {
'header-max-length': [2, 'always', 100],
'body-max-line-length': [1, 'always', 150],
},
ignores: [(message) => /^chore\(release\): .+$/m.test(message)],
helpUrl: 'https://kongponents.konghq.com/contributing/getting-started.html',
}
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Settings in the [build] context are global and are applied to all contexts
# unless otherwise overridden by more specific contexts.
#
# Defaulting to the settings for the `main` branch
# Defaulting to the settings for the `main` branch (this covers `alpha` and `beta`)
[build]
base = "/"
command = "yarn docs:build"
56 changes: 56 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}

0 comments on commit df01f80

Please sign in to comment.