[Docs Agent] Please add documentation to the github-docs-agent sample #15
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
| name: Documentation Agent | |
| on: | |
| issues: | |
| types: [opened] | |
| jobs: | |
| trigger-uipath-docs-agent: | |
| if: contains(github.event.issue.title, '[Docs Agent]') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - 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; import os; issue_title = json.loads(os.environ['ISSUE_TITLE']) or ''; issue_body = json.loads(os.environ['ISSUE_BODY']) or ''; content = issue_title + (('\n\n' + issue_body) if issue_body else ''); 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}')" |