You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/genai-video-issue-analyzer.yml
+15-2Lines changed: 15 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,18 @@
1
-
name: genai video issue analyzer
1
+
name: Video Analyzer
2
2
on:
3
3
issues:
4
4
types: [opened, edited]
5
+
workflow_dispatch:
6
+
inputs:
7
+
video_url:
8
+
description: 'Direct video URL to analyze'
9
+
required: true
10
+
type: string
11
+
instructions:
12
+
description: 'Custom prompting instructions for the video'
13
+
required: false
14
+
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.'
Copy file name to clipboardExpand all lines: README.md
+117-2Lines changed: 117 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
# GitHub Action Video Issue Analyzer
2
2
3
-
This GitHub Action runs all video assets in an issue body through a LLM model to analyze the content.
4
-
The default behavior is to summarize and extract task items but this can be customized through the `prompt` input.
3
+
This GitHub Action runs all video assets in an issue body through a LLM model to analyze the content, or can analyze a direct video URL when triggered via workflow_dispatch.
4
+
The default behavior is to summarize and extract task items but this can be customized through the `instructions` input.
5
+
6
+
The action outputs the analysis results to the GitHub Step Summary for easy viewing in the Actions tab.
5
7
6
8
## Inputs
7
9
@@ -22,6 +24,7 @@ The default behavior is to summarize and extract task items but this can be cust
22
24
|`azure_ai_inference_api_version`| Azure Serverless OpenAI API version | false ||
23
25
|`azure_ai_inference_api_credentials`| Azure Serverless OpenAI API credentials type | false ||
24
26
|`github_token`| GitHub token with `models: read` permission at least (https://microsoft.github.io/genaiscript/reference/github-actions/#github-models-permissions).| false ||
27
+
|`video_url`| Direct video URL to analyze (alternative to extracting from issue body). Used when triggered via workflow_dispatch. | false ||
25
28
26
29
## Outputs
27
30
@@ -30,6 +33,8 @@ The default behavior is to summarize and extract task items but this can be cust
30
33
31
34
|`text`| The generated text output. |
32
35
36
+
**Note**: The action also outputs the analysis results to the GitHub Step Summary (`$GITHUB_STEP_SUMMARY`) for easy viewing in the Actions tab.
37
+
33
38
## Usage
34
39
35
40
Add the following to your step in your workflow file.
@@ -62,6 +67,8 @@ It will launch a whisper service in a container that can be used by genaiscript.
62
67
63
68
Save the following in `.github/workflows/genai-video-issue-analyzer.yml` file:
64
69
70
+
### For Issue-based Analysis (automatic trigger)
71
+
65
72
```yaml
66
73
name: genai video issue analyzer
67
74
on:
@@ -104,6 +111,114 @@ jobs:
104
111
github_token: ${{ secrets.GITHUB_TOKEN }}
105
112
```
106
113
114
+
### For Direct Video URL Analysis (manual trigger)
115
+
116
+
```yaml
117
+
name: genai video issue analyzer
118
+
on:
119
+
workflow_dispatch:
120
+
inputs:
121
+
video_url:
122
+
description: 'Direct video URL to analyze'
123
+
required: true
124
+
type: string
125
+
instructions:
126
+
description: 'Custom prompting instructions for the video'
127
+
required: false
128
+
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.'
description: 'Custom prompting instructions for the video'
180
+
required: false
181
+
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.'
Copy file name to clipboardExpand all lines: genaisrc/action-video-issue-analyzer.genai.mts
+61-20Lines changed: 61 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -8,34 +8,46 @@ script({
8
8
default:
9
9
"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.",
10
10
},
11
+
videoUrl: {
12
+
type: "string",
13
+
description: "Direct video URL to analyze (alternative to extracting from issue body)",
14
+
},
11
15
},
12
16
});
13
17
14
18
const{ dbg, output, vars }=env;
15
-
constissue=awaitgithub.getIssue();
16
-
if(!issue)
17
-
thrownewError(
18
-
"No issue found in the context. This action requires an issue to be present.",
"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.";
24
+
25
+
// Process direct video URL if provided
26
+
if(videoUrl){
27
+
dbg(`Processing direct video URL: ${videoUrl}`);
28
+
awaitprocessDirectVideoUrl(videoUrl);
29
+
}else{
30
+
// Fallback to extracting from issue body
31
+
constissue=awaitgithub.getIssue();
32
+
if(!issue)
33
+
thrownewError(
34
+
"No issue found in the context and no videoUrl provided. This action requires either an issue to be present or a videoUrl parameter.",
0 commit comments