feat: add folder support for job retrieve #65
Workflow file for this run
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: GitHub Reviewer Slack Agent | |
on: | |
pull_request: | |
types: [opened] | |
jobs: | |
trigger-uipath-agent: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Python dependencies | |
run: pip install requests | |
- name: Trigger UiPath Agent | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
REPO_NAME: ${{ github.repository }} | |
OWNER_NAME: ${{ github.repository_owner }} | |
run: | | |
python -c "import requests; import json; import os; comment = {'messages': [{'role': 'user', 'content': f'You are reviewing PR #{os.environ['PR_NUMBER']}, repo: {os.environ['REPO_NAME']}, owner: {os.environ['OWNER_NAME']}'}]}; payload = json.dumps(comment); resp = requests.post('${{ secrets.UIPATH_SLACK_URL }}/orchestrator_/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs', headers={'Authorization': 'Bearer ${{ secrets.UIPATH_SLACK_PAT }}', 'Content-Type': 'application/json', 'X-UiPath-FolderPath': 'MCP Folder'}, json={'startInfo': {'releaseName': 'github-slack-agent', 'inputArguments': payload}}); print(f'Status code: {resp.status_code}'); print(f'Response: {resp.text}')" |