-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from omnisat/test
testing
- Loading branch information
Showing
6 changed files
with
193 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
setup: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import openai | ||
import os | ||
|
||
# Get the OpenAI API key from environment variables | ||
openai.api_key = os.getenv("OPENAI_API_KEY") | ||
|
||
# Read the git diff content from a file (generated in the GitHub Action) | ||
with open('changes.diff', 'r') as f: | ||
diff_content = f.read() | ||
|
||
# Use OpenAI's GPT to generate detailed release notes based on the git diff | ||
response = openai.Completion.create( | ||
model="gpt-4", | ||
prompt=f"Generate detailed release notes based on this git diff: {diff_content}", | ||
max_tokens=500 | ||
) | ||
|
||
# Print the generated release notes to stdout | ||
print(response['choices'][0]['text'].strip()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import openai | ||
import os | ||
|
||
# Get the OpenAI API key from environment variables | ||
openai.api_key = os.getenv("OPENAI_API_KEY") | ||
|
||
# Read the aggregated release notes from a file | ||
with open('release_notes_aggregated.txt', 'r') as f: | ||
release_notes = f.read() | ||
|
||
# Use OpenAI's GPT to summarize the release notes | ||
response = openai.Completion.create( | ||
model="gpt-4", | ||
prompt=f"Summarize these release notes: {release_notes}", | ||
max_tokens=500 | ||
) | ||
|
||
# Print the summarized release notes to stdout | ||
print(response['choices'][0]['text'].strip()) |