Skip to content

Update Compatibility Matrix #141

Update Compatibility Matrix

Update Compatibility Matrix #141

# Copyright 2025 Snyk Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Update Compatibility Matrix
on:
schedule:
# Run daily at 2 AM UTC
- cron: '0 2 * * *'
workflow_dispatch:
inputs:
dry_run:
description: 'Dry run (print output without creating PR)'
required: false
default: 'false'
type: boolean
permissions:
contents: read
actions: read
pull-requests: write
jobs:
update-matrix:
name: Update Compatibility Matrix
runs-on: ubuntu-latest
steps:
- name: Checkout snyk-ls repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Build compatibility matrix generator
run: |
cd scripts/compatibility-matrix
go build -o ../../build/compatibility-matrix .
- name: Generate compatibility matrix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p output
if [[ "${{ github.event.inputs.dry_run }}" == "true" ]]; then
./build/compatibility-matrix -dry-run
else
./build/compatibility-matrix -output output/compatibility-matrix.md
fi
- name: Checkout user-docs repository
if: github.event.inputs.dry_run != 'true'
uses: actions/checkout@v4
with:
repository: snyk/user-docs
path: user-docs
token: ${{ secrets.HAMMERHEAD_GITHUB_PAT_SNYKLS }}
- name: Update compatibility matrix in user-docs
if: github.event.inputs.dry_run != 'true'
run: |
mkdir -p user-docs/docs/developer-tools/snyk-ide-plugins-and-extensions
cp output/compatibility-matrix.md user-docs/docs/developer-tools/snyk-ide-plugins-and-extensions/compatibility-matrix.md
- name: Create pull request
if: github.event.inputs.dry_run != 'true'
env:
GH_TOKEN: ${{ secrets.HAMMERHEAD_GITHUB_PAT_SNYKLS }}
run: |
cd user-docs
# Configure git
git config --global user.name "snyk-ls-bot"
git config --global user.email "[email protected]"
# Create a new branch
BRANCH_NAME="chore/update-ide-compatibility-matrix-$(date +%Y%m%d)"
git checkout -b "$BRANCH_NAME"
# Commit changes
git add docs/developer-tools/snyk-ide-plugins-and-extensions/compatibility-matrix.md
# Check if there are changes to commit
if git diff --staged --quiet; then
echo "No changes to commit"
exit 0
fi
git commit -m "chore: update IDE plugin compatibility matrix
Automated update of the IDE plugin compatibility matrix showing
the compatible CLI version range for each IDE plugin version
released in the past 12 months.
Generated by: https://github.com/snyk/snyk-ls/blob/main/.github/workflows/update-compatibility-matrix.yaml"
# Push the branch
git push -f origin "$BRANCH_NAME"
# Create PR using gh CLI
gh pr create \
--title "chore: update IDE plugin compatibility matrix" \
--body "## Description
This PR updates the IDE plugin compatibility matrix with the latest release information.
The matrix shows the latest compatible CLI version for each IDE plugin version released in the past 12 months.
## Changes
- Updated compatibility matrix with latest IDE plugin releases
- Matrix includes: VSCode, IntelliJ, Visual Studio, and Eclipse plugins
## Notes
- This is an automated PR generated daily
- The matrix is generated from GitHub releases of the IDE plugins
- CLI versions shown are from the stable channel
---
_Generated by [snyk-ls compatibility matrix workflow](https://github.com/snyk/snyk-ls/blob/main/.github/workflows/update-compatibility-matrix.yaml)_" \
--base main \
--head "$BRANCH_NAME" \
--repo snyk/user-docs
# enable auto merge
# gh pr merge -m --auto --delete-branch