Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 2, 2025

This PR implements support for receiving video URLs as parameters through workflow_dispatch arguments, addressing the requirement to process videos directly without needing them to be uploaded as issue assets.

Changes Made

🎯 Core Functionality

  • Added videoUrl parameter to action.yml allowing direct video URL processing as an alternative to extracting URLs from issue bodies
  • Enhanced GenAI script to support both issue-based asset extraction and direct video URL processing with camelCase parameter naming
  • Made instructions optional - the script now uses sensible defaults when no custom instructions are provided
  • Maintained backward compatibility - existing issue-based workflows continue to work unchanged

🚀 Workflow Enhancements

  • Added dedicated video-url-analyzer.yml workflow specifically for video URL analysis with required video_url input
  • Enhanced CI workflow with optional video URL support for testing
  • Flexible trigger support - workflows can now use issue events, manual dispatch, or both

📊 Output Improvements

  • Automatic Step Summary output - genaiscript automatically sends analysis results to $GITHUB_STEP_SUMMARY for easy viewing in the GitHub Actions interface
  • Preserved existing outputs - the text output is still available for programmatic access

📚 Documentation Updates

  • Comprehensive examples showing multiple workflow configurations
  • Updated parameter documentation with the new videoUrl input and optional instructions
  • Added note about Step Summary output for better user experience

Usage Examples

Dedicated Video URL Analysis

Users can now use the dedicated workflow for video analysis:

# .github/workflows/video-url-analyzer.yml
name: Video URL Analyzer
on:
  workflow_dispatch:
    inputs:
      video_url:
        description: 'Direct video URL to analyze'
        required: true
        type: string

Flexible Action Usage

- uses: pelikhan/action-genai-video-issue-analyzer@v0
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    video_url: ${{ github.event.inputs.video_url }}
    # instructions are now optional with sensible defaults

The analysis results will appear in both the step summary and as a workflow output, making it easy to review the AI-generated video analysis directly in the GitHub interface.

Testing

  • ✅ TypeScript compilation passes
  • ✅ Backward compatibility maintained for existing issue-based workflows
  • ✅ New videoUrl parameter properly integrated with camelCase naming
  • ✅ Instructions parameter made optional with fallback defaults
  • ✅ Dedicated workflow configuration validated

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Update workflow and action to support receiving the video URL as a parameter. The parameter should be provided through the workflow_dispatch arguments. The output of the prompt should be sent to the $GITHUB_STEP_SUMMARY. Add video URL parameter support and workflow_dispatch trigger Aug 2, 2025
Copilot AI requested a review from pelikhan August 2, 2025 09:43
const { instructions } = vars as { instructions: string };
const { instructions, video_url } = vars as { instructions: string; video_url?: string };

if (!instructions)
Copy link
Owner

Choose a reason for hiding this comment

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

optional, ignore missing instructions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made instructions optional by removing the error check and using a default value when instructions are not provided. Commit e5b3be5

inputs:
github_issue:
description: "GitHub issue number to comment on"
required: true
Copy link
Owner

Choose a reason for hiding this comment

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

add a new workflow file that only dedicated to running the action using a video url (so required will be true)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created a new dedicated workflow file video-url-analyzer.yml that only handles video URL analysis with video_url as a required parameter. Commit e5b3be5

default:
"Analyze the video and provide a summary of its content. Extract list of followup subissues if any. The transcript is your primary source of text information, ignore text in images.",
},
video_url: {
Copy link
Owner

Choose a reason for hiding this comment

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

use camelize (videoUrl) in this file and it will automatically be converted to snaked naming by genaiscript.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed video_url to videoUrl (camelCase) in the genai script parameters. GenAI will automatically convert this to snake_case naming. Commit e5b3be5

@pelikhan
Copy link
Owner

pelikhan commented Aug 2, 2025

@copilot apply reviews

…oUrl, and add dedicated video URL workflow

Co-authored-by: pelikhan <[email protected]>
Copy link
Contributor Author

Copilot AI commented Aug 2, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.sheetjs.com
    • Triggering command: npm ci (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Add video URL parameter support and workflow_dispatch trigger Add video URL parameter support with optional instructions and dedicated workflow Aug 2, 2025
Copilot AI requested a review from pelikhan August 2, 2025 10:04
…permissions in video-url-analyzer.yml; update action command in package.json to include output trace
@pelikhan pelikhan marked this pull request as ready for review August 2, 2025 11:04
@pelikhan pelikhan merged commit 22bf130 into main Aug 2, 2025
2 checks passed
@pelikhan pelikhan deleted the copilot/fix-a5e52bc0-33dc-4256-9143-f7d56da9e69a branch August 2, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants