File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Gemini AI Issue Summarizer
22
33on :
4- # This workflow now triggers when a new issue is opened
4+ # Triggers when a new issue is opened or an existing issue body/title is edited
55 issues :
6- types : [opened]
6+ types : [opened, edited ]
77
88jobs :
99 summarize :
10- # Ensure the job only runs for new issues and not from the bot itself
11- if : github.event.issue.author.login != 'github-actions[bot]'
10+ # Skip events triggered by the bot itself; for edits, only process body/title changes
11+ if : |
12+ github.actor != 'github-actions[bot]' &&
13+ (github.event.action == 'opened' ||
14+ (github.event.action == 'edited' && (github.event.changes.body != null || github.event.changes.title != null)))
1215 runs-on : ubuntu-latest
1316 permissions :
1417 contents : read
1518 issues : write
1619
1720 steps :
1821 - name : Checkout repository
19- uses : actions/checkout@v6
22+ uses : actions/checkout@v4
2023
2124 - name : Set up Node.js
2225 uses : actions/setup-node@v4
2326 with :
2427 node-version : ' 20'
2528
29+ - name : Cache node modules
30+ uses : actions/cache@v4
31+ with :
32+ path : ~/.npm
33+ key : ${{ runner.os }}-gemini-issues-${{ hashFiles('.github/scripts/review.js') }}
34+ restore-keys : |
35+ ${{ runner.os }}-gemini-issues-
36+
2637 - name : Install dependencies
2738 run : npm install @actions/github @google/generative-ai @octokit/core
2839
You can’t perform that action at this time.
0 commit comments