Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ jobs:
- name: Cleanup old development builds
run: |
c=1
for i in $(gh release view -R konveyor/editor-extensions development-builds --json assets | jq -r .assets[].name | sort -r); do
for i in $(gh release view -R migtools/editor-extensions development-builds --json assets | jq -r .assets[].name | sort -r); do
if [ "$c" -gt 7 ]; then
gh release delete-asset -y -R konveyor/editor-extensions development-builds $i
gh release delete-asset -y -R migtools/editor-extensions development-builds $i
fi
c=$((c+1))
done
Expand Down
151 changes: 151 additions & 0 deletions .github/workflows/mta-build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
name: MTA Build & Release

on:
workflow_dispatch:
inputs:
upload_artifacts:
description: "Upload artifacts as workflow artifacts"
required: false
default: true
type: boolean
push:
tags:
- "mta-*"
- "v*-mta"

concurrency:
group: mta-build-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

env:
HUSKY: 0

jobs:
build-mta-extension:
name: Build MTA Extension
runs-on: ubuntu-latest

steps:
- name: Get GitHub App Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.MIGTOOLS_BOT_ID }}
private-key: ${{ secrets.MIGTOOLS_BOT_KEY }}

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}

- name: Get upstream Konveyor SHA
id: upstream_sha
run: |
# Add konveyor remote if it doesn't exist
git remote add konveyor https://github.com/konveyor/editor-extensions.git 2>/dev/null || true
git fetch konveyor main

# Find the merge base (last common commit) between current branch and konveyor/main
UPSTREAM_SHA=$(git merge-base HEAD konveyor/main)
UPSTREAM_SHA_SHORT=$(git rev-parse --short $UPSTREAM_SHA)

echo "upstream_sha=${UPSTREAM_SHA}" >> $GITHUB_OUTPUT
echo "upstream_sha_short=${UPSTREAM_SHA_SHORT}" >> $GITHUB_OUTPUT

echo "## Upstream Information" >> $GITHUB_STEP_SUMMARY
echo "- **Upstream SHA**: [\`${UPSTREAM_SHA_SHORT}\`](https://github.com/konveyor/editor-extensions/commit/${UPSTREAM_SHA})" >> $GITHUB_STEP_SUMMARY
echo "- **Downstream SHA**: [\`${GITHUB_SHA:0:7}\`](https://github.com/${{ github.repository }}/commit/${GITHUB_SHA})" >> $GITHUB_STEP_SUMMARY

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"

- name: Install workspace dependencies
run: npm ci

- name: Collect runtime assets
run: npm run collect-assets

- name: Build all workspaces
run: npm run build
env:
UPSTREAM_GIT_SHA: ${{ steps.upstream_sha.outputs.upstream_sha }}

- name: Create distribution package
run: npm run dist

- name: Package VSIX
run: npm run package

- name: Get package info
id: package_info
run: |
PACKAGE_NAME=$(node -p "require('./dist/package.json').name")
PACKAGE_VERSION=$(node -p "require('./dist/package.json').version")
VSIX_FILE="${PACKAGE_NAME}-${PACKAGE_VERSION}.vsix"

# Create build metadata
BUILD_INFO="Built from konveyor/editor-extensions@${{ steps.upstream_sha.outputs.upstream_sha_short }}"

echo "package_name=${PACKAGE_NAME}" >> $GITHUB_OUTPUT
echo "package_version=${PACKAGE_VERSION}" >> $GITHUB_OUTPUT
echo "vsix_file=${VSIX_FILE}" >> $GITHUB_OUTPUT
echo "vsix_path=./dist/${VSIX_FILE}" >> $GITHUB_OUTPUT
echo "build_info=${BUILD_INFO}" >> $GITHUB_OUTPUT

- name: Verify VSIX file exists
run: |
if [ ! -f "${{ steps.package_info.outputs.vsix_path }}" ]; then
echo "VSIX file not found: ${{ steps.package_info.outputs.vsix_path }}"
ls -la ./dist/
exit 1
fi
echo "VSIX file found: ${{ steps.package_info.outputs.vsix_path }}"

- name: Upload VSIX as workflow artifact
if: ${{ inputs.upload_artifacts != false }}
uses: actions/upload-artifact@v4
with:
name: ${{ steps.package_info.outputs.vsix_file }}
path: ${{ steps.package_info.outputs.vsix_path }}
retention-days: 30
compression-level: 0 # No compression since VSIX is already compressed

- name: Create GitHub Release (on tag)
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.package_info.outputs.vsix_path }}
name: MTA Extension ${{ steps.package_info.outputs.package_version }}
body: |
## MTA Extension Release ${{ steps.package_info.outputs.package_version }}

Migration Toolkit for Applications VS Code Extension

### Build Information
- **Based on**: [konveyor/editor-extensions@${{ steps.upstream_sha.outputs.upstream_sha_short }}](https://github.com/konveyor/editor-extensions/commit/${{ steps.upstream_sha.outputs.upstream_sha }})
- **Built**: ${{ github.run_id }} on ${{ github.ref_name }}

### Installation
Download the `.vsix` file and install it in VS Code:
```
code --install-extension ${{ steps.package_info.outputs.vsix_file }}
```

Or use the VS Code Extensions view: Extensions → Views and More Actions → Install from VSIX
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

- name: Summary
run: |
echo "## Build Summary" >> $GITHUB_STEP_SUMMARY
echo "- **Package**: ${{ steps.package_info.outputs.package_name }}" >> $GITHUB_STEP_SUMMARY
echo "- **Version**: ${{ steps.package_info.outputs.package_version }}" >> $GITHUB_STEP_SUMMARY
echo "- **VSIX File**: ${{ steps.package_info.outputs.vsix_file }}" >> $GITHUB_STEP_SUMMARY
echo "- **Trigger**: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
if [ "${{ github.event_name }}" = "push" ]; then
echo "- **Tag**: ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
fi
51 changes: 51 additions & 0 deletions .github/workflows/sync-migtools-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Sync with konveyor

on:
workflow_dispatch:
# Manual triggering only

jobs:
sync:
name: Rebase onto migtools
runs-on: ubuntu-latest

steps:
- name: Get GitHub App Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.MIGTOOLS_BOT_ID }}
private-key: ${{ secrets.MIGTOOLS_BOT_KEY }}

- name: Checkout code
uses: actions/checkout@v4
with:
# Fetch full history for rebase
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Add konveyor remote
run: |
git remote add konveyor https://github.com/konveyor/editor-extensions.git
git fetch konveyor ${{ github.ref_name }}

- name: Attempt rebase onto konveyor
run: |
echo "Current branch: $(git branch --show-current)"
echo "Attempting to rebase onto konveyor/${{ github.ref_name }}..."

# This will fail hard if there are conflicts
git rebase konveyor/${{ github.ref_name }}

echo "Rebase successful!"

- name: Push rebased changes
run: |
git push --force-with-lease origin $(git branch --show-current)
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
99 changes: 99 additions & 0 deletions assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Migration Toolkit for Applications (MTA)

A powerful VS Code extension for application modernization and migration analysis. Leverages a rule-based analysis engine to identify modernization opportunities and optionally uses generative AI to help migrate applications to newer platforms or architectures.

---

## Features

- **Code Analysis**: Comprehensive analysis of your codebase for modernization opportunities
- **Customizable Rules**: Configure analysis settings, rulesets, and filters
- **Interactive UI**: Dedicated views for analysis results and solution management

### Red Hat Developer Lightspeed for migration toolkit for applications features

- **AI-Powered Solutions**: Optional generative AI integration for automated fix suggestions
- **Agent Mode**: Experimental automated fixes with diagnostics integration

*Note: Obtaining support for features in Developer Lightspeed for migration toolkit for applications requires a Red Hat Advanced Developer Suite (RHADS) subscription.*

---

## Quick Start

1. Install the extension from the VS Code marketplace
2. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and run "MTA: Open Analysis View"

---

## Basic Workflow

### 1. Create Analysis Profile

- Configure analysis settings and rules
- Set up your analysis scope and targets

### 2. Run Analysis

- Start the server
- Run analysis on your code
- View results in the panel

### 3. Configure AI (Optional)

To enable AI-powered solution generation, enable AI features and configure your AI provider through the extension settings.

### 4. Generate Solutions

- Select issues you want to fix
- Generate AI solutions or apply manual fixes
- Review and accept/reject proposed changes

---

## Configuration

The extension can be configured through VS Code settings. Key settings include:

- **Log Level**: Control extension logging verbosity
- **Analyzer Path**: Use custom analyzer binary
- **GenAI Settings**: Configure AI provider and behavior
- **Analysis Options**: Customize analysis scope and rules

## Path Exclusion

The extension supports `.gitignore`-style exclusion patterns:

1. Create an ignore file in your workspace root
2. Use standard gitignore syntax to exclude files/directories
3. Falls back to `.gitignore` if no custom ignore file exists

---

## Requirements

- **Java Projects**: Requires Red Hat Java extension for Java analysis
- **AI Features**: Optional - configure AI provider for solution generation

---

## Troubleshooting

### Logs

Access extension logs through:

- **Command Palette**: "Show Extension Logs Directory"
- **Output Panel**: Select the extension from the dropdown

### Common Issues

- Ensure required language extensions are installed
- Check that analysis server starts successfully
- Verify AI provider configuration if using solution generation

---

## License

This extension is licensed under the [Apache License 2.0](LICENSE).
Loading
Loading