Skip to content

Commit

Permalink
Fix bugs in auto-generated PR summaries (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
lava authored Feb 6, 2025
1 parent 3ed6163 commit f404c65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-submodules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
if [ ${current_sha} != ${upstream_sha} ]; then
git -C components/app checkout origin/main
echo -e "Bump app component from ${current_sha_short} to ${upstream_sha_short}\n\n"
echo -e "Bump app component from ${current_sha_short} to ${upstream_sha_short}\n\n" > commitmsg
./scripts/describe-component-bump components/app ${current_sha} ${upstream_sha} >> commitmsg ||:
git add components/app
Expand Down
5 changes: 3 additions & 2 deletions scripts/describe-component-bump
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo ${REQUEST_JSON} >&2
echo "Access token length: ${#GCLOUD_ACCESS_TOKEN}" >&2
echo "Access token first four chars: ${GCLOUD_ACCESS_TOKEN:0:4}" >&2

RESPONSE=$(curl -s -X POST \
RESPONSE=$(curl -s --fail -X POST \
-H "Authorization: Bearer ${GCLOUD_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
https://${LOCATION}-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/${LOCATION}/publishers/google/models/${MODEL}:generateContent \
Expand All @@ -32,5 +32,6 @@ RESPONSE=$(curl -s -X POST \
if [ $? -eq 0 ]; then
echo ${RESPONSE} | jq -r .candidates[0].content.parts[0].text
else
echo $(git -C ${SUBMODULE_PATH} log --oneline --first-parent --no-decorate ${FROM_COMMIT}..${TO_COMMTI})
echo $(git -C ${SUBMODULE_PATH} log --oneline --first-parent --no-decorate ${FROM_COMMIT}..${TO_COMMIT})
fi
echo "\n\nView Changes: https://github.com/tenzir/app/compare/${current_sha}...${upstream_sha}"

0 comments on commit f404c65

Please sign in to comment.