File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1313git config user.name " docs-generator[bot]"
1414git config user.email " docs-generator[bot]@amazon.com"
1515
16- # Create branch, pull if needed (for updating existing docs PRs), and push
17- git checkout -B " $BRANCH_NAME "
18- if git ls-remote --exit-code --heads origin $BRANCH_NAME ; then
19- git pull origin $BRANCH_NAME
20- fi
16+ # Push (branch should have already been created in update-docs.sh)
2117git add docs
2218git commit -m " Update docs based on PR #$PR_NUMBER
2319
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4+ BRANCH_NAME=" docs-update-for-pr-$PR_NUMBER "
5+
46if [ ! -f " $PR_FILE " ]; then
57 echo " PR file not found, aborting"
68 exit 1
79fi
810
11+ # Create branch before making any changes
12+ git checkout -B " $BRANCH_NAME "
13+ if git ls-remote --exit-code --heads origin $BRANCH_NAME ; then
14+ git pull origin $BRANCH_NAME --force
15+ fi
16+
917PROMPT=" Before making any changes, read the 'docs' directory for the project's current
1018documentation. Then read 'pr-contents.txt' to see the contents of the current PR.\n\n
1119After reading both the directory and the PR file, update the files in the 'docs' directory
12- with new, concise documentation reflecting the proposed changes in the PR. Make new files as appropriate."
20+ with new, concise documentation reflecting ONLY the proposed changes in the PR. Make new files as appropriate.
21+ Do not document changes or functionalities not related to the PR."
1322
1423timeout 10m echo -e $PROMPT | qchat chat --non-interactive --trust-all-tools
1524exit $?
You can’t perform that action at this time.
0 commit comments