Skip to content

Commit fc42b52

Browse files
author
kiran-garre
committed
Add debug statements, fixed test PR number
1 parent 9ab3587 commit fc42b52

File tree

3 files changed

+27
-22
lines changed

3 files changed

+27
-22
lines changed

.github/workflows/docs-generator.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: docs-generator
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
pr_number:
7-
description: 'Number of PR to document'
8-
required: true
9-
type: string
4+
# workflow_dispatch:
5+
# inputs:
6+
# pr_number:
7+
# description: 'Number of PR to document'
8+
# required: true
9+
# type: string
1010
push:
1111

1212
jobs:
@@ -19,6 +19,7 @@ jobs:
1919
PR_FILE: "pr-contents.txt"
2020
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2121
GIT_HASH: "latest"
22+
TEST_PR_NUMBER: 2533
2223
permissions:
2324
id-token: write
2425
contents: write
@@ -45,14 +46,14 @@ jobs:
4546
run: bash docs-generation/setup_amazon_q.sh
4647

4748
- name: Generate PR contents file
48-
run: bash docs-generation/read-pr.sh ${{ inputs.pr_number }}
49+
run: bash docs-generation/read-pr.sh ${{ env.TEST_PR_NUMBER }}
4950

5051
- name: Update docs
5152
run: bash docs-generation/update-docs.sh
5253

5354
- name: Create PR
5455
if: success()
55-
run: bash docs-generation/create-docs-pr.sh ${{ inputs.pr_number }}
56+
run: bash docs-generation/create-docs-pr.sh ${{ env.TEST_PR_NUMBER }}
5657

5758

5859

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 make 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/update-docs.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ documentation. Then read 'pr-contents.txt' to see the contents of the current PR
1111
After reading both the directory and the PR file, update the files in the 'docs' directory
1212
with new documentation reflecting the proposed changes in the PR. Make new files as appropriate."
1313

14+
cat pr-contents.txt
15+
1416
echo -e $PROMPT | qchat chat --non-interactive

0 commit comments

Comments
 (0)