From 3713c48c40c2cbf38c95106484ddd2468c2f6c67 Mon Sep 17 00:00:00 2001 From: Jefftree Date: Wed, 19 Feb 2025 15:11:52 +0000 Subject: [PATCH 1/4] from richa --- .github/workflows/gemini-pr-review.yml | 57 ++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/gemini-pr-review.yml diff --git a/.github/workflows/gemini-pr-review.yml b/.github/workflows/gemini-pr-review.yml new file mode 100644 index 0000000000000..fa04abea1c8e4 --- /dev/null +++ b/.github/workflows/gemini-pr-review.yml @@ -0,0 +1,57 @@ +name: Gemini PR Review + +on: + pull_request: + types: [opened, synchronize] # Triggers on PR open and code updates + +jobs: + gemini_review: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' # Or your preferred version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install google-generativeai + + - name: Get PR diff + id: get_diff + run: | + echo "DIFF<> $GITHUB_OUTPUT + git diff origin/${GITHUB_BASE_REF}...origin/${GITHUB_HEAD_REF} >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Gemini API Call + id: gemini_review_call + run: | + python < Date: Wed, 19 Feb 2025 15:55:00 +0000 Subject: [PATCH 2/4] . --- .github/workflows/gemini-pr-review.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gemini-pr-review.yml b/.github/workflows/gemini-pr-review.yml index fa04abea1c8e4..73abde2515163 100644 --- a/.github/workflows/gemini-pr-review.yml +++ b/.github/workflows/gemini-pr-review.yml @@ -12,12 +12,12 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - fetch-depth: 0 + fetch-depth: 0 # seems necessary to diff with master instead of using HEAD - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.9' # Or your preferred version + python-version: '3.9' - name: Install dependencies run: | @@ -28,20 +28,22 @@ jobs: id: get_diff run: | echo "DIFF<> $GITHUB_OUTPUT - git diff origin/${GITHUB_BASE_REF}...origin/${GITHUB_HEAD_REF} >> $GITHUB_OUTPUT + echo $(git diff origin/${GITHUB_BASE_REF}...origin/${GITHUB_HEAD_REF} | base64) >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - name: Gemini API Call id: gemini_review_call run: | python < Date: Wed, 19 Feb 2025 15:45:39 +0000 Subject: [PATCH 3/4] test --- staging/src/k8s.io/api/core/v1/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 050f62cd2c251..f97ea6b6abde4 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -1953,7 +1953,7 @@ type ServiceAccountTokenProjection struct { // its time to live or if the token is older than 24 hours.Defaults to 1 hour // and must be at least 10 minutes. // +optional - ExpirationSeconds *int64 `json:"expirationSeconds,omitempty" protobuf:"varint,2,opt,name=expirationSeconds"` + ExpirationSeconds *int32 `json:"expirationSeconds,omitempty" protobuf:"varint,2,opt,name=expirationSeconds"` // path is the path relative to the mount point of the file to project the // token into. Path string `json:"path" protobuf:"bytes,3,opt,name=path"` From 317a63d869fe1a8f9c02a73ef45aa9443e7e34c0 Mon Sep 17 00:00:00 2001 From: Jefftree Date: Wed, 19 Feb 2025 16:26:47 +0000 Subject: [PATCH 4/4] . --- staging/src/k8s.io/api/core/v1/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index f97ea6b6abde4..a7bce616dc8f7 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -2559,7 +2559,7 @@ type ExecAction struct { // SleepAction describes a "sleep" action. type SleepAction struct { // Seconds is the number of seconds to sleep. - Seconds int64 `json:"seconds" protobuf:"bytes,1,opt,name=seconds"` + Seconds int32 `json:"seconds" protobuf:"bytes,1,opt,name=seconds"` } // Probe describes a health check to be performed against a container to determine whether it is