Skip to content

Commit 8a83eea

Browse files
author
kiran-garre
committed
Try gh pr diff instead of manually getting diff
1 parent 8760adc commit 8a83eea

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

docs-generation/read-pr.sh

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,9 @@ PR_NUMBER=$1
77
echo "====== PR Information ======\n" > $PR_FILE
88
gh pr view $PR_NUMBER --json title,body --jq '"Title: " + .title + "\nDescription: " + .body' >> $PR_FILE
99

10-
# Include updated files
11-
echo -e "\n====== Updated files ======\n" >> $PR_FILE
12-
gh pr view $PR_NUMBER --json files --jq ".files[].path" | while read file; do
13-
case "$file" in
14-
*.lock|*-lock.*|*.min.*|dist/*|build/*|target/*)
15-
continue
16-
;;
17-
esac
18-
if [ -f "$file" ]; then
19-
echo "---- $file ----" >> $PR_FILE
20-
git diff main -- "$file" >> $PR_FILE
21-
echo -e "\n" >> $PR_FILE
22-
fi
23-
done
10+
# Include PR diffs
11+
echo -e "\n====== PR Diffs ======\n" >> $PR_FILE
12+
gh pr diff $PR_NUMBER >> $PR_FILE
2413

2514

2615

docs-generation/update-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ with new documentation reflecting the proposed changes in the PR. Make new files
1313

1414
cat pr-contents.txt
1515
echo "Would prompt q chat here"
16-
timeout 10m echo -e $PROMPT | qchat chat --non-interactive --trust-all-tools
16+
# timeout 10m echo -e $PROMPT | qchat chat --non-interactive --trust-all-tools
1717
exit $?

0 commit comments

Comments
 (0)