From 423ed276eb9cdab43aeae303c41ea619a91acc33 Mon Sep 17 00:00:00 2001 From: Cristian Pufu Date: Fri, 25 Apr 2025 21:51:00 +0300 Subject: [PATCH] Fix: Escape issue title / description --- .github/workflows/trigger-docs-agent.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/trigger-docs-agent.yml b/.github/workflows/trigger-docs-agent.yml index e6e0866..d18e447 100644 --- a/.github/workflows/trigger-docs-agent.yml +++ b/.github/workflows/trigger-docs-agent.yml @@ -10,5 +10,8 @@ jobs: - name: Install Python dependencies run: pip install requests - name: Trigger UiPath Documentation Agent + env: + ISSUE_TITLE: ${{ toJson(github.event.issue.title) }} + ISSUE_BODY: ${{ toJson(github.event.issue.body) }} run: | - python -c "import requests; import json; resp = requests.post('${{ secrets.UIPATH_URL }}/orchestrator_/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs', headers={'Authorization': 'Bearer ${{ secrets.UIPATH_ACCESS_TOKEN }}', 'Content-Type': 'application/json', 'X-UiPath-FolderPath': 'MCP Folder'}, json={'startInfo': {'releaseName': 'github-documentation-agent', 'inputArguments': json.dumps({'messages': [{'role': 'user', 'content': '${{ github.event.issue.title }}\n\n${{ github.event.issue.body }}'}], 'owner': '${{ github.repository_owner }}', 'repo': '${{ github.event.repository.name }}', 'issueNumber': ${{ github.event.issue.number }}})}}); print(f'Status code: {resp.status_code}'); print(f'Response: {resp.text}')" + python -c "import requests; import json; import os; issue_title = json.loads(os.environ['ISSUE_TITLE']); issue_body = json.loads(os.environ['ISSUE_BODY']); content = issue_title + '\n\n' + issue_body; resp = requests.post('${{ secrets.UIPATH_URL }}/orchestrator_/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs', headers={'Authorization': 'Bearer ${{ secrets.UIPATH_ACCESS_TOKEN }}', 'Content-Type': 'application/json', 'X-UiPath-FolderPath': 'MCP Folder'}, json={'startInfo': {'releaseName': 'github-documentation-agent', 'inputArguments': json.dumps({'messages': [{'role': 'user', 'content': content}], 'owner': '${{ github.repository_owner }}', 'repo': '${{ github.event.repository.name }}', 'issueNumber': ${{ github.event.issue.number }}})}}); print(f'Status code: {resp.status_code}'); print(f'Response: {resp.text}')"