Feature: Improve workflow trigger command and add get-workflow-run command#43755
Conversation
|
Thank you for your contribution. Your generosity and caring are unrivaled! Make sure to register your contribution by filling the Contribution Registration form, so our content wizard @kamalq97 will know the proposed changes are ready to be reviewed. |
🤖 AI-Powered Code Review AvailableHi @kamalq97, you can leverage AI-powered code review to assist with this PR! Available Commands:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub integration’s workflow functionality by modernizing the github-trigger-workflow request headers and introducing a new command to retrieve workflow run details (github-get-workflow-run), including YAML output definitions and unit tests.
Changes:
- Update
github-trigger-workflowto send newer GitHub REST headers and attempt to return workflow run data. - Add
github-get-workflow-run/GitHub-get-workflow-runcommand to fetch a workflow run byrun_id. - Add test data + unit test coverage for the new command, and update the trigger-workflow test description.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| Packs/GitHub/Integrations/GitHub/GitHub.py | Updates trigger-workflow behavior/headers and adds the get-workflow-run command implementation + command registration. |
| Packs/GitHub/Integrations/GitHub/GitHub.yml | Adds output schemas for trigger-workflow and registers the new get-workflow-run command (deprecated + canonical). |
| Packs/GitHub/Integrations/GitHub/GitHub_test.py | Adds a unit test for get-workflow-run and updates the trigger-workflow test description. |
| Packs/GitHub/Integrations/GitHub/test_data/get_workflow_run_response.json | Adds a sample workflow-run JSON response for tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@marketplace-ai-reviewer start review |
|
🤖 Analysis started. Please wait for results... |
🤖 AI Review DisclaimerThis review was generated by an AI-powered tool and may contain inaccuracies. Please be advised, and we extend our sincere apologies for any inconvenience this may cause. |
marketplace-ai-reviewer
left a comment
There was a problem hiding this comment.
Hi! Thanks for your contribution to the GitHub integration. I've left a few notes on the PR, primarily regarding standardizing context output keys to PascalCase and fixing a typo in the API version headers. You'll also need to update a couple of outdated test assertions, add date format examples to the YAML descriptions, and remove an unnecessary deprecated command. Thanks again for your work!
@kamalq97, @copilot-pull-request-reviewer[bot] please review and approve the results generated by the AI Reviewer by responding 👍 on this comment.
Contributing to Cortex XSOAR Content
Make sure to register your contribution by filling the contribution registration form
The Pull Request will be reviewed only after the contribution registration form is filled.
Status
Description
This PR improves the GitHub integration by updating the
github-trigger-workflowcommand to use the latest GitHub REST API specification and adding a newgithub-get-workflow-runcommand.github-trigger-workflowcommandAcceptheader fromapplication/vnd.github.v3+jsontoapplication/vnd.github+jsonand addedX-GitHub-Api-Version: 2026-03-10to align with the current GitHub REST API versioning.200response with the workflow run details. The command now returns aCommandResultsobject withoutputs_prefix="GitHub.WorkflowRun"containing the triggered run data.workflow_run_id,run_url,html_url.New
github-get-workflow-runcommandrun_id.CommandResultsobject withoutputs_prefix="GitHub.WorkflowRun"and outputs:id,name,head_branch,head_sha,display_title,run_number,event,status,conclusion,workflow_id,url,html_url,created_at,updated_at.GitHub-get-workflow-run) and current (github-get-workflow-run) command sections of the YAML manifest.Must have
relates: https://jira-dc.paloaltonetworks.com/browse/CIAC-16455