Skip to content

Commit

Permalink
Update update-changelog.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpejcic authored Oct 5, 2023
1 parent 9fafac8 commit a27e573
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Update Changelog
on:
push:
branches:
- master
- master # Modify this to match your repository's default branch

jobs:
generate-summary:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
echo "::set-output name=commit_diff::$diff"
- name: Set ChatGPT API Key
run: echo "CHATGPT_API_KEY=$CHATGPT_API_KEY" >> $GITHUB_ENV
run: echo "export CHATGPT_API_KEY=$CHATGPT_API_KEY" >> $GITHUB_ENV

- name: Generate Summary
id: generate_summary
Expand All @@ -42,7 +42,7 @@ jobs:
commit_diff="${{ steps.commit_diff.outputs.commit_diff }}"
# Generate a summary using ChatGPT
summary=$(echo "$commit_diff" | openai api completions.create --model text-davinci-002 | jq -r '.choices[0].text')
summary=$(echo "$commit_diff" | OPENAI_API_KEY=$CHATGPT_API_KEY openai api completions.create --model text-davinci-002 | jq -r '.choices[0].text')
echo "::set-output name=summary::$summary"
- name: Update Changelog
Expand All @@ -58,3 +58,4 @@ jobs:
git add CHANGELOG.md
git commit -m "Update changelog"
git push

0 comments on commit a27e573

Please sign in to comment.