Skip to content

Commit 3ec25f7

Browse files
authored
Merge pull request #61 from UiPath/fix/issue_title_description_escape
Fix: Escape issue title / description
2 parents 2657bc8 + 423ed27 commit 3ec25f7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/trigger-docs-agent.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ jobs:
1010
- name: Install Python dependencies
1111
run: pip install requests
1212
- name: Trigger UiPath Documentation Agent
13+
env:
14+
ISSUE_TITLE: ${{ toJson(github.event.issue.title) }}
15+
ISSUE_BODY: ${{ toJson(github.event.issue.body) }}
1316
run: |
14-
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}')"
17+
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}')"

0 commit comments

Comments
 (0)