Skip to content

Commit b45b560

Browse files
committed
make chatgpt model configurable, publish comment with link to PR with comments
1 parent 74cc2cd commit b45b560

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

.github/workflows/generate-go-docs.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ jobs:
9595
folder=$(echo "$item" | jq -r '.folder')
9696
echo "Processing folder: $folder"
9797
generate-go-function-docs diff -b ${{ github.event.pull_request.base.sha }} -c ${{ github.event.pull_request.head.sha }} --saveCosts --generator chatgpt --generatorSubType ${{ vars.GO_DOC_GEN_CHATGPT_MODEL }} --folder "$folder"
98-
cd "$folder"
99-
cd -
10098
done
10199
rm filtered_folders.json
102100
@@ -134,19 +132,17 @@ jobs:
134132
id: fc
135133
with:
136134
issue-number: ${{ github.event.pull_request.number }}
137-
comment-author: 'github-actions[bot]'
138-
body-includes: Go doc generation
135+
body-includes: Go doc generation
139136

140137
- name: Create comment in the original PR
141138
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
142-
if: ${{ steps.fc.outputs.comment-id }} == ''
139+
if: steps.fc.outputs.comment-id == 0
143140
with:
144141
token: ${{ steps.setup-github-token-write.outputs.access-token }}
145142
issue-number: ${{ github.event.pull_request.number }}
146143
body: |
147144
## Go doc generation
148-
Hey @${{ github.actor }}, you can check generated Go function generation [here](${{ steps.create-pr.outputs.pull-request-url }}).
149-
Please review them and merge to this PR once you're satisfied with them.
145+
Hey @${{ github.actor }}, you can check generated Go function documentation [here](${{ steps.create-pr.outputs.pull-request-url }}). Please review them and merge to this PR once you're satisfied with them.
150146
151147
- name: Send Slack notification
152148
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0

0 commit comments

Comments
 (0)