Skip to content

Commit 07db3d0

Browse files
author
kiran-garre
committed
Display only file diffs to q chat rather than entire file contents, comment out PR creation for debug
1 parent 298ed66 commit 07db3d0

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

docs-generation/create-docs-pr.sh

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,23 @@ if [ -z "$(git status --porcelain)" ]; then
1010
exit 0
1111
fi
1212

13-
git config user.name "docs-generator[bot]"
14-
git config user.email "docs-generator[bot]@amazon.com"
13+
echo "Would create PR now"
1514

16-
# Create branch and push
17-
git checkout -b "$BRANCH_NAME"
18-
git add .
19-
git commit -m "Update docs based on PR #$PR_NUMBER
15+
# git config user.name "docs-generator[bot]"
16+
# git config user.email "docs-generator[bot]@amazon.com"
2017

21-
Auto-generated by Q"
18+
# # Create branch and push
19+
# git checkout -b "$BRANCH_NAME"
20+
# git add .
21+
# git commit -m "Update docs based on PR #$PR_NUMBER
2222

23-
git push origin "$BRANCH_NAME"
23+
# Auto-generated by Q"
2424

25-
# Create PR
26-
gh pr create \
27-
--title "Update docs based on PR #$PR_NUMBER" \
28-
--body "Auto-generated documentation updates based on changes in PR #$PR_NUMBER" \
29-
--base main \
30-
--head "$BRANCH_NAME"
25+
# git push origin "$BRANCH_NAME"
26+
27+
# # Create PR
28+
# gh pr create \
29+
# --title "Update docs based on PR #$PR_NUMBER" \
30+
# --body "Auto-generated documentation updates based on changes in PR #$PR_NUMBER" \
31+
# --base main \
32+
# --head "$BRANCH_NAME"

docs-generation/read-pr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ gh pr view $PR_NUMBER --json files --jq ".files[].path" | while read file; do
1717
esac
1818
if [ -f "$file" ]; then
1919
echo "---- $file ----" >> $PR_FILE
20-
cat "$file" >> $PR_FILE
20+
git diff main -- "$file" >> $PR_FILE
2121
echo -e "\n" >> $PR_FILE
2222
fi
2323
done

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)