diff --git a/.github/workflows/trigger-jetbrains-tests.yml b/.github/workflows/trigger-jetbrains-tests.yml new file mode 100644 index 0000000000..f76de65f90 --- /dev/null +++ b/.github/workflows/trigger-jetbrains-tests.yml @@ -0,0 +1,51 @@ +name: Trigger Jetbrains Plugin <-> Cline Tests +on: + pull_request: + types: [opened, synchronize, reopened] +permissions: + contents: read +concurrency: + group: jetbrains-trigger-${{ github.event.number }} + cancel-in-progress: true + +jobs: + trigger-integration-test: + name: Run Tests + runs-on: ubuntu-latest + steps: + - name: Generate GitHub App Token + id: app-token + uses: actions/create-github-app-token@v1 + with: + app-id: 1998650 + private-key: ${{ secrets.CLINE_JETBRAINS_WORKFLOW_KEY }} + owner: cline + repositories: intellij-plugin + + - name: Trigger IntelliJ Plugin Integration Test + run: | + curl -X POST \ + -H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -H "User-Agent: cline-pr-trigger" \ + -H "Content-Type: application/json" \ + https://api.github.com/repos/cline/intellij-plugin/dispatches \ + -d '{ + "event_type": "cline-pr-check", + "client_payload": { + "pr_number": "${{ github.event.number }}", + "branch_name": "${{ github.head_ref }}", + "action": "${{ github.event.action }}", + "sha": "${{ github.event.pull_request.head.sha }}", + "pr_title": "${{ github.event.pull_request.title }}", + "pr_url": "${{ github.event.pull_request.html_url }}" + } + }' + + - name: Log trigger details + run: | + echo "Triggered IntelliJ Plugin integration test for:" + echo " PR #${{ github.event.number }}: ${{ github.event.pull_request.title }}" + echo " Branch: ${{ github.head_ref }}" + echo " Action: ${{ github.event.action }}" + echo " SHA: ${{ github.event.pull_request.head.sha }}"