Skip to content

Commit c8a914d

Browse files
committed
Merge branch 'main' into micro-phases
* main: Bump requests from 2.32.4 to 2.32.5 (#1298) Fix output of container logs ("print-logs" flag) + Reuse ScenarioRunner object for all files/iterations (#1290) Bump actions/checkout from 4 to 5 in /.github/workflows (#1295) Bump python from 3.13.6-slim-bookworm to 3.13.7-slim-bookworm in /docker (#1293) Bump actions/create-github-app-token in /.github/workflows (#1294) Updated Gemini Actions Workflow to latest version from upstream Update gemini-pr-review.yml - Only run when actively triggered via comment Bump orjson from 3.11.1 to 3.11.2 (#1288)
2 parents d0bcdfa + b84fefb commit c8a914d

16 files changed

+247
-94
lines changed

.github/workflows/build-and-push-containers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
electricitymaps-api-token: ${{ secrets.ELECTRICITYMAPS_TOKEN }}
3434

3535
- name: Checkout repository
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@v5
3737

3838
## This is needed for multi-architecture builds
3939
- name: Set up QEMU

.github/workflows/build-codespace-container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
electricitymaps-api-token: ${{ secrets.ELECTRICITYMAPS_TOKEN }}
2222

2323
- name: Checkout repository
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v5
2525

2626
- name: Set up QEMU
2727
uses: docker/setup-qemu-action@v3

.github/workflows/gemini-pr-review.yml

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
name: '🧐 Gemini Pull Request Review'
22

3-
# From: https://github.com/google-github-actions/run-gemini-cli/blob/main/examples/workflows/pr-review/gemini-pr-review.yml
4-
53
on:
6-
pull_request:
7-
types:
8-
- 'opened'
9-
- 'reopened'
4+
# pull_request:
5+
# types:
6+
# - 'opened'
7+
# - 'reopened'
108
issue_comment:
119
types:
1210
- 'created'
13-
pull_request_review_comment:
14-
types:
15-
- 'created'
16-
pull_request_review:
17-
types:
18-
- 'submitted'
11+
# pull_request_review_comment:
12+
# types:
13+
# - 'created'
14+
# pull_request_review:
15+
# types:
16+
# - 'submitted'
1917
workflow_dispatch:
2018
inputs:
2119
pr_number:
@@ -40,11 +38,17 @@ permissions:
4038

4139
jobs:
4240
review-pr:
41+
# This condition seeks to ensure the action is only run when it is triggered by a trusted user.
42+
# For private repos, users who have access to the repo are considered trusted.
43+
# For public repos, users who members, owners, or collaborators are considered trusted.
4344
if: |-
4445
github.event_name == 'workflow_dispatch' ||
4546
(
4647
github.event_name == 'pull_request' &&
47-
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association)
48+
(
49+
github.event.repository.private == true ||
50+
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association)
51+
)
4852
) ||
4953
(
5054
(
@@ -55,25 +59,30 @@ jobs:
5559
github.event_name == 'pull_request_review_comment'
5660
) &&
5761
contains(github.event.comment.body, '@gemini-cli /review') &&
58-
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
62+
(
63+
github.event.repository.private == true ||
64+
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
65+
)
5966
) ||
6067
(
6168
github.event_name == 'pull_request_review' &&
6269
contains(github.event.review.body, '@gemini-cli /review') &&
63-
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.review.author_association)
70+
(
71+
github.event.repository.private == true ||
72+
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.review.author_association)
73+
)
6474
)
6575
timeout-minutes: 5
6676
runs-on: 'ubuntu-latest'
67-
6877
steps:
6978
- name: 'Checkout PR code'
70-
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4
79+
uses: 'actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493' # ratchet:actions/checkout@v4
7180

7281
- name: 'Generate GitHub App Token'
7382
id: 'generate_token'
7483
if: |-
7584
${{ vars.APP_ID }}
76-
uses: 'actions/create-github-app-token@0f859bf9e69e887678d5bbfbee594437cb440ffe' # ratchet:actions/create-github-app-token@v2
85+
uses: 'actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b' # ratchet:actions/create-github-app-token@v2
7786
with:
7887
app-id: '${{ vars.APP_ID }}'
7988
private-key: '${{ secrets.APP_PRIVATE_KEY }}'
@@ -111,14 +120,14 @@ jobs:
111120
} >> "${GITHUB_OUTPUT}"
112121
113122
114-
- name: 'Get PR details (issue_comment)'
123+
- name: 'Get PR details (issue_comment & reviews)'
115124
id: 'get_pr_comment'
116125
if: |-
117-
${{ github.event_name == 'issue_comment' }}
126+
${{ github.event_name == 'issue_comment' || github.event_name == 'pull_request_review' || github.event_name == 'pull_request_review_comment' }}
118127
env:
119128
GITHUB_TOKEN: '${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}'
120-
COMMENT_BODY: '${{ github.event.comment.body }}'
121-
PR_NUMBER: '${{ github.event.issue.number }}'
129+
COMMENT_BODY: '${{ github.event.comment.body || github.event.review.body }}'
130+
PR_NUMBER: '${{ github.event.issue.number || github.event.pull_request.number }}'
122131
run: |-
123132
set -euo pipefail
124133
@@ -163,6 +172,7 @@ jobs:
163172
use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}'
164173
settings: |-
165174
{
175+
"debug": ${{ fromJSON(env.DEBUG || env.ACTIONS_STEP_DEBUG || false) }},
166176
"maxSessionTurns": 20,
167177
"mcpServers": {
168178
"github": {
@@ -213,7 +223,7 @@ jobs:
213223
## Steps
214224
215225
Start by running these commands to gather the required data:
216-
1. Run: echo $"{REPOSITORY}" to get the github repository in <OWNER>/<REPO> format
226+
1. Run: echo "${REPOSITORY}" to get the github repository in <OWNER>/<REPO> format
217227
2. Run: echo "${PR_DATA}" to get PR details (JSON format)
218228
3. Run: echo "${CHANGED_FILES}" to get the list of changed files
219229
4. Run: echo "${PR_NUMBER}" to get the PR number
@@ -455,4 +465,4 @@ jobs:
455465
repo: '${{ github.repository }}'.split('/')[1],
456466
issue_number: '${{ steps.get_pr.outputs.pr_number || steps.get_pr_comment.outputs.pr_number }}',
457467
body: 'There is a problem with the Gemini CLI PR review. Please check the [action logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.'
458-
})
468+
})

.github/workflows/tests-bare-metal-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- if: ${{ github.event_name == 'workflow_dispatch' || steps.check-date.outputs.should_run == 'true'}}
3636
name: 'Checkout repository'
37-
uses: actions/checkout@v4
37+
uses: actions/checkout@v5
3838
with:
3939
ref: 'main'
4040
submodules: 'false'

.github/workflows/tests-eco-ci-energy-estimation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
contents: read
1212
steps:
1313
- name: 'Checkout repository'
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v5
1515
with:
1616
ref: 'main'
1717
submodules: 'false'

.github/workflows/tests-vm-mac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- if: ${{ github.event_name == 'workflow_dispatch' || steps.check-date.outputs.should_run == 'true'}}
2020
name: 'Checkout repository'
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222
with:
2323
ref: ${{ github.ref }}
2424
submodules: 'false'

.github/workflows/tests-vm-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- if: ${{ github.event_name == 'workflow_dispatch' || steps.check-date.outputs.should_run == 'true'}}
3737
name: 'Checkout repository'
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v5
3939
with:
4040
ref: 'main'
4141
submodules: 'false'

.github/workflows/tests-vm-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
co2-grid-intensity-api-token: ${{ secrets.ELECTRICITYMAPS_TOKEN }}
2222

2323
- name: 'Checkout repository'
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v5
2525
with:
2626
ref: ${{ github.ref }}
2727
submodules: 'false'

docker/Dockerfile-gunicorn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.13.6-slim-bookworm
1+
FROM python:3.13.7-slim-bookworm
22
ENV DEBIAN_FRONTEND=noninteractive
33

44
WORKDIR /var/www/startup/

docker/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ uvicorn[standard]==0.35.0
77
pandas==2.3.1
88
PyYAML==6.0.2
99
anybadge==1.16.0
10-
orjson==3.11.1
10+
orjson==3.11.2
1111
scipy==1.15.2
1212
schema==0.7.7
1313
deepdiff==8.6.0
1414
redis==6.4.0
1515
hiredis==3.2.1
16-
requests==2.32.4
16+
requests==2.32.5
1717
uvicorn-worker==0.3.0
1818
cachetools==6.1.0
1919

0 commit comments

Comments
 (0)