Feat/tool integration beta - #79
Draft
Amazing-Stardom wants to merge 445 commits into
Draft
Conversation
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
Add OpenAPI yaml validation
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:8, coverage:30%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
…to feat/mcp-server
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
LiveReview Pre-Commit Check: skipped (iter:1, coverage:0%)
feat: feedback APIs
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
…to feat/mcp-server
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: vouched (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:2, coverage:0%)
Azure integration
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
AWS Bedrock integration
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:3, coverage:49%)
…eams-mcp-integration
LiveReview Pre-Commit Check: vouched (iter:2, coverage:93%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
Add Microsoft Teams Integration to LiveReview
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:6, coverage:100%)
LiveReview Pre-Commit Check: ran (iter:2, coverage:54%)
…Spec LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:2, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
…lder LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
LiveReview Pre-Commit Check: ran (iter:1, coverage:0%)
Amazing-Stardom
force-pushed
the
feat/tool-integration-beta
branch
from
July 26, 2026 14:38
580c1b5 to
96b7669
Compare
Comment on lines
+12
to
+106
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
| JWT_SECRET: ${{ secrets.JWT_SECRET }} | ||
| TOKENROUTER_API_KEY: ${{ secrets.TOKENROUTER_API_KEY }} | ||
| LIVEREVIEW_API_KEY_TR: ${{ secrets.LIVEREVIEW_API_KEY_TR }} | ||
|
|
||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "22" | ||
| - name: Install Python dependencies | ||
| run: | | ||
| pip install -r tests/mcp/requirements.txt | ||
|
|
||
| - name: Build LiveReview | ||
| run: make build-ci | ||
|
|
||
| - name: Start MCP server | ||
| run: | | ||
| nohup ./livereview api > server.log 2>&1 & | ||
| echo $! > server.pid | ||
|
|
||
| - name: Wait for server startup | ||
| run: | | ||
| for i in {1..30}; do | ||
| response=$(curl -s http://localhost:8888/health || true) | ||
|
|
||
| if echo "$response" | grep -q '"status":"healthy"\|"status": "healthy"'; then | ||
| echo "Server is healthy" | ||
| exit 0 | ||
| fi | ||
|
|
||
| echo "Waiting for server to start..." | ||
| sleep 2 | ||
| done | ||
|
|
||
| echo "Server failed to become healthy" | ||
| cat server.log | ||
| exit 1 | ||
|
|
||
| - name: Run MCP test script | ||
| run: | | ||
| python tests/mcp/mcp-testcase.py | ||
|
|
||
| - name: Check MCP test result | ||
| run: | | ||
| python - <<EOF | ||
| import json | ||
| import sys | ||
|
|
||
| with open("tests/mcp/test_results.json") as f: | ||
| result = json.load(f) | ||
|
|
||
| status = result.get("suite_summary", {}).get("overall_status") | ||
|
|
||
| print(f"Overall Status: {status}") | ||
|
|
||
| if status == "PASSED": | ||
| print("MCP test passed") | ||
| sys.exit(0) | ||
|
|
||
| print("MCP test failed") | ||
| print(json.dumps(result, indent=2)) | ||
| sys.exit(1) | ||
| EOF | ||
| - name: Upload MCP Test Results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: mcp-test-results | ||
| path: tests/mcp/test_results.json | ||
| retention-days: 30 | ||
| - name: Print server logs on failure | ||
| if: failure() | ||
| run: cat server.log || true | ||
|
|
||
| - name: Cleanup | ||
| if: always() | ||
| run: | | ||
| kill $(cat server.pid) || true |
| if not matches: | ||
| print("Action: create webhook") | ||
| if args.dry_run: | ||
| print(json.dumps(payload_for_logging(payload), indent=2)) |
|
|
||
| print(f"Action: update webhook id={webhook_id}") | ||
| if args.dry_run: | ||
| print(json.dumps(payload_for_logging(payload), indent=2)) |
| if repoURL == "" { | ||
| return nil, fmt.Errorf("failed to create bitbucket provider: repo_url is required but was not provided") | ||
| } | ||
| log.Printf("[DEBUG] Bitbucket token exists: %v, email: %s, repoURL: %s", len(apiToken) > 0, email, repoURL) |
| if repoURL == "" { | ||
| return nil, fmt.Errorf("failed to create bitbucket provider: repo_url is required but was not provided") | ||
| } | ||
| log.Printf("[DEBUG] Bitbucket token exists: %v, email: %s, repoURL: %s", len(apiToken) > 0, email, repoURL) |
| } | ||
| req.Header.Set("Content-Type", "application/json") | ||
|
|
||
| resp, err := b.client.Do(req) |
| log.Printf("[TeamsBot] JWT validation failed") | ||
| return c.JSON(http.StatusUnauthorized, map[string]string{"error": "unauthorized"}) | ||
| } | ||
| log.Printf("[TeamsBot] Error handling activity: %s", err) |
| } | ||
| defer rows.Close() | ||
|
|
||
| items := make([]AdminBillingPortfolioOrg, 0, limit) |
| } | ||
| proxyReq.Header.Set("Content-Type", "application/json") | ||
|
|
||
| proxyResp, err := http.DefaultClient.Do(proxyReq) |
| err error | ||
| ) | ||
| if connectorID, ok := parseInt64MetadataValue(event.MergeRequest.Metadata, "connector_id"); ok && connectorID > 0 { | ||
| token, _, err = giteainput.FindIntegrationTokenByConnectorID(p.server.DB(), int(connectorID)) |
| func (wo *WebhookOrchestratorV2) postQuotaExhaustedResponse(provider WebhookProviderV2, event *UnifiedWebhookEventV2, locUsed int64, locLimit int64) { | ||
| if provider == nil || event == nil { | ||
| return | ||
| } |
| req.Header.Set(k, v) | ||
| } | ||
|
|
||
| resp, err := mcpHTTPClient.Do(req) |
| } | ||
|
|
||
| log.Printf("[SlackOAuth] Bot token proxied successfully to %s org %s", targetURL, orgID) | ||
| return c.Redirect(http.StatusFound, fmt.Sprintf("%s/settings#integrations", targetURL)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.