Skip to content

Commit 53decf2

Browse files
committed
fix: update instructions input and improve issue retrieval logic
1 parent 42e1e9e commit 53decf2

File tree

4 files changed

+13
-18
lines changed

4 files changed

+13
-18
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ The default behavior is to summarize and extract task items but this can be cust
55

66
## Inputs
77

8-
- `instructions`: Custom prompt to use for the LLM model. If not provided, a default prompt will be used.
98
- `github_token`: GitHub token with `models: read` permission at least. **(required)**
10-
- `github_issue`: The issue number to analyze. **(required)**
9+
- `instructions`: Custom prompt to use for the LLM model. If not provided, a default prompt will be used.
10+
- `github_issue`: The issue number to analyze. Typically this variable is inferred from the event context.
1111
- `debug`: Enable debug logging.
1212

1313
## Usage
@@ -35,7 +35,6 @@ It will launch a whisper service in a container that can be used by genaiscript.
3535
- uses: actions/checkout@v4
3636
- uses: pelikhan/action-genai-video-issue-analyzer@v0
3737
with:
38-
github_issue: ${{ github.event.issue.number }}
3938
github_token: ${{ secrets.GITHUB_TOKEN }}
4039
```
4140
@@ -53,7 +52,7 @@ permissions:
5352
issues: write
5453
models: read
5554
concurrency:
56-
group: ${{ github.workflow }}-${{ github.ref }}
55+
group: ${{ github.workflow }}-${{ github.event.issue.number }}
5756
cancel-in-progress: true
5857
jobs:
5958
genai-video-analyze:
@@ -76,7 +75,6 @@ jobs:
7675
- uses: actions/checkout@v4
7776
- uses: pelikhan/action-genai-video-issue-analyzer@v0
7877
with:
79-
github_issue: ${{ github.event.issue.number }}
8078
github_token: ${{ secrets.GITHUB_TOKEN }}
8179
```
8280

genaisrc/action-video-issue-analyzer.genai.mts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ script({
1212
});
1313

1414
const { dbg, output, vars } = env;
15-
dbg(`event path: %s`, process.env.GITHUB_EVENT_PATH);
16-
const event = await workspace.readJSON(process.env.GITHUB_EVENT_PATH)
17-
dbg(`event: %O`, event);
18-
const issue = await github.getIssue(event.issue?.number);
15+
const issue = await github.getIssue();
1916
if (!issue)
2017
throw new Error(
2118
"No issue found in the context. This action requires an issue to be present.",

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dependencies": {
3-
"genaiscript": "1.142.10"
3+
"genaiscript": "1.142.12"
44
},
55
"scripts": {
66
"upgrade": "npx -y npm-check-updates -u && npm install",

0 commit comments

Comments
 (0)