Skip to main content

Setup Breaking Change Detection in GitHub Pull Requests

info

Breaking change detection ensures that your API does not break older SDKs.

Workflow Template​

Copy the following template to .github/workflows/konfig-detect-breaking-change.yaml and configure the following values.

  1. Target branch
  2. Path to OAS
.github/workflows/konfig-detect-breaking-change.yaml

_22
name: "konfig-detect-breaking-change"
_22
on:
_22
pull_request:
_22
branches:
_22
- main
_22
jobs:
_22
konfig-lint-openapi-spec:
_22
runs-on: ubuntu-latest
_22
env:
_22
CLI_VERSION: 1.0.181
_22
steps:
_22
- uses: actions/checkout@v3
_22
- name: Cache node_modules
_22
id: cache-npm
_22
uses: actions/cache@v3
_22
with:
_22
path: ~/.npm
_22
key: ${{ runner.os }}-build-${{ env.CLI_VERSION }}
_22
- name: Install Konfig CLI
_22
run: npm install -g konfig-cli@$CLI_VERSION
_22
- name: Detect breaking change
_22
run: konfig detect-breaking-change -m ${{github.base_ref}} -s path/to/openapi.yaml