- Created package.json and package-lock.json for CLI package. - Implemented argument parsing in args.ts to handle various flags and commands. - Developed main CLI logic in cli.ts to execute commands and handle errors. - Added configuration loading from a JSON file in config.ts, with environment variable support. - Implemented prompt resolution and provider interaction in prompt.ts. - Added usage documentation for the CLI. - Configured TypeScript settings in tsconfig.json for the CLI package. - Updated README in vscode package to reflect the new CLI functionality. - Refactored root tsconfig.json to streamline project structure.
54 lines
1.7 KiB
YAML
54 lines
1.7 KiB
YAML
name: Preview — PR Build Check
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
preview-build:
|
|
name: PR Preview Build
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:22-bookworm
|
|
|
|
steps:
|
|
- name: Install zip curl
|
|
run: apt-get update -qq && apt-get install -y zip curl
|
|
|
|
- name: Checkout PR
|
|
run: |
|
|
git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git .
|
|
git fetch origin pull/${{ gitea.event.pull_request.number }}/head:pr
|
|
git checkout pr
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: packages/chrome
|
|
|
|
- name: Type check
|
|
run: npm run typecheck
|
|
working-directory: packages/chrome
|
|
|
|
- name: Run unit tests
|
|
run: npm test -- --run
|
|
working-directory: packages/chrome
|
|
|
|
- name: Build extension
|
|
run: npm run build
|
|
working-directory: packages/chrome
|
|
|
|
- name: Package preview ZIP
|
|
run: |
|
|
PR_NUM=${{ gitea.event.pull_request.number }}
|
|
zip -r ../../lexai-pr-${PR_NUM}-preview.zip .output/chrome-mv3/
|
|
echo "✅ PR #${PR_NUM} build successful"
|
|
working-directory: packages/chrome
|
|
|
|
- name: Comment on PR
|
|
run: |
|
|
PR_NUM=${{ gitea.event.pull_request.number }}
|
|
curl -s -X POST "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/issues/${PR_NUM}/comments" \
|
|
-H "Authorization: token ${{ secrets.GITEATOKEN }}" \
|
|
-H "Content-Type: application/json" \
|
|
-d "{\"body\": \"## ⚡ LexAI Preview Build Ready\n\n✅ Tests passed\n✅ Build successful\n✅ TypeScript clean\n\nCommit: \`${{ gitea.sha }}\`\"}"
|