Skip to content

Commit 4509442

Browse files
committed
refactor pr
1 parent 736bbb8 commit 4509442

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

testcases/ground-to-cloud/mcp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"servers": {
3-
"mathmcp-{PR}-{RUN_ID}": {
3+
"mathmcp-PRNUMBER": {
44
"transport": "stdio",
55
"command": "python",
66
"args": ["server.py"]

testcases/ground-to-cloud/run.sh

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,11 @@ uv run uipath auth --client-id="$CLIENT_ID" --client-secret="$CLIENT_SECRET" --b
2121
# Remove empty tenantId line if exists
2222
sed -i '/^UIPATH_TENANT_ID=[[:space:]]*$/d' .env
2323

24-
# # Now overwrite just the ACCESS_TOKEN with PAT_TOKEN
25-
# if [ -n "$PAT_TOKEN" ]; then
26-
# # Use sed to replace only the active UIPATH_ACCESS_TOKEN line (not commented ones)
27-
# sed -i "s|^UIPATH_ACCESS_TOKEN=.*|UIPATH_ACCESS_TOKEN=$PAT_TOKEN|" .env
28-
# else
29-
# echo "Warning: PAT_TOKEN environment variable is not set!"
30-
# fi
31-
3224
# Generate dynamic values
3325
PR_NUMBER=${GITHUB_PR_NUMBER:-"local"}
3426
RUN_ID=${GITHUB_RUN_ID:-$(date +%s)}
3527
UNIQUE_ID=$(python -c "import uuid; print(str(uuid.uuid4()))" 2>/dev/null || python3 -c "import uuid; print(str(uuid.uuid4()))")
36-
MCP_SERVER_NAME="mathmcp-${PR_NUMBER}-${RUN_ID}"
28+
MCP_SERVER_NAME="mathmcp-${PR_NUMBER}"
3729

3830
echo "Updating uipath.json with dynamic values..."
3931
echo "PR Number: $PR_NUMBER"
@@ -42,12 +34,10 @@ echo "MCP Server Name: $MCP_SERVER_NAME"
4234
echo "Unique ID: $UNIQUE_ID"
4335

4436
# Replace placeholders in uipath.json using sed
45-
sed -i "s/{PR}/$PR_NUMBER/g" uipath.json
46-
sed -i "s/{RUN_ID}/$RUN_ID/g" uipath.json
47-
sed -i "s/{UNIQUE_ID}/$UNIQUE_ID/g" uipath.json
37+
sed -i "s/PRNUMBER/$PR_NUMBER/g" uipath.json
38+
sed -i "s/163f06b8-31e6-4639-aa31-ae4a88968a92/$UNIQUE_ID/g" uipath.json
4839

49-
sed -i "s/{PR}/$PR_NUMBER/g" mcp.json
50-
sed -i "s/{RUN_ID}/$RUN_ID/g" mcp.json
40+
sed -i "s/PRNUMBER/$PR_NUMBER/g" mcp.json
5141

5242
echo "Packing agent..."
5343
uv run uipath pack

testcases/ground-to-cloud/uipath.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"entryPoints": [
33
{
4-
"filePath": "mathmcp-{PR}-{RUN_ID}",
5-
"uniqueId": "{UNIQUE_ID}",
4+
"filePath": "mathmcp-PRNUMBER",
5+
"uniqueId": "163f06b8-31e6-4639-aa31-ae4a88968a92",
66
"type": "mcpserver",
77
"input": {},
88
"output": {}

0 commit comments

Comments
 (0)