Skip to content

Feature: Improve workflow trigger command and add get-workflow-run command#43755

Open
jesusgpo wants to merge 9 commits intodemisto:contrib/jesusgpo_feature/github-workfow-runs-improvementsfrom
jesusgpo:feature/github-workfow-runs-improvements
Open

Feature: Improve workflow trigger command and add get-workflow-run command#43755
jesusgpo wants to merge 9 commits intodemisto:contrib/jesusgpo_feature/github-workfow-runs-improvementsfrom
jesusgpo:feature/github-workfow-runs-improvements

Conversation

@jesusgpo
Copy link
Copy Markdown
Contributor

@jesusgpo jesusgpo commented Apr 1, 2026

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

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Description

This PR improves the GitHub integration by updating the github-trigger-workflow command to use the latest GitHub REST API specification and adding a new github-get-workflow-run command.

github-trigger-workflow command

  • Updated Accept header from application/vnd.github.v3+json to application/vnd.github+json and added X-GitHub-Api-Version: 2026-03-10 to align with the current GitHub REST API versioning.
  • The API now returns a 200 response with the workflow run details. The command now returns a CommandResults object with outputs_prefix="GitHub.WorkflowRun" containing the triggered run data.
  • Added outputs to the YAML manifest: workflow_run_id, run_url, html_url.

New github-get-workflow-run command

  • Retrieves details of a specific workflow run by run_id.
  • Returns a CommandResults object with outputs_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.
  • Registered in both the deprecated (GitHub-get-workflow-run) and current (github-get-workflow-run) command sections of the YAML manifest.

Must have

  • Tests
  • Documentation

relates: https://jira-dc.paloaltonetworks.com/browse/CIAC-16455

Copilot AI review requested due to automatic review settings April 1, 2026 07:45
@content-bot content-bot added Contribution Thank you! Contributions are always welcome! External PR Xsoar Support Level Indicates that the contribution is for XSOAR supported pack labels Apr 1, 2026
@content-bot content-bot changed the base branch from master to contrib/jesusgpo_feature/github-workfow-runs-improvements April 1, 2026 07:47
@content-bot content-bot requested a review from kamalq97 April 1, 2026 07:47
@content-bot
Copy link
Copy Markdown
Contributor

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.
For your convenience, here is a link to the contributions SLAs document.

@content-bot
Copy link
Copy Markdown
Contributor

Hi @jesusgpo, thanks for contributing to the XSOAR marketplace. To receive credit for your generous contribution please follow this link.

@content-bot
Copy link
Copy Markdown
Contributor

🤖 AI-Powered Code Review Available

Hi @kamalq97, you can leverage AI-powered code review to assist with this PR!

Available Commands:

  • @marketplace-ai-reviewer start review - Initiate a full AI code review
  • @marketplace-ai-reviewer re-review - Incremental review for new commits

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-workflow to send newer GitHub REST headers and attempt to return workflow run data.
  • Add github-get-workflow-run / GitHub-get-workflow-run command to fetch a workflow run by run_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.

@jesusgpo
Copy link
Copy Markdown
Contributor Author

jesusgpo commented Apr 1, 2026

@marketplace-ai-reviewer start review

@content-bot content-bot added Community Contribution Form Filled Whether contribution form filled or not. labels Apr 1, 2026
@marketplace-ai-reviewer
Copy link
Copy Markdown
Contributor

🤖 Analysis started. Please wait for results...

@marketplace-ai-reviewer
Copy link
Copy Markdown
Contributor

🤖 AI Review Disclaimer

This 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.

Copy link
Copy Markdown
Contributor

@marketplace-ai-reviewer marketplace-ai-reviewer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Contribution Form Filled Whether contribution form filled or not. Contribution Thank you! Contributions are always welcome! External PR Xsoar Support Level Indicates that the contribution is for XSOAR supported pack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants