https://github.com/oliverswitzer/commit_summarizer_action
A github action that automatically summarizes your commits when you tag them with [summrize]
https://github.com/oliverswitzer/commit_summarizer_action
Last synced: about 2 months ago
JSON representation
A github action that automatically summarizes your commits when you tag them with [summrize]
- Host: GitHub
- URL: https://github.com/oliverswitzer/commit_summarizer_action
- Owner: oliverswitzer
- Created: 2023-10-05T03:02:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-05T03:28:17.000Z (over 1 year ago)
- Last Synced: 2025-02-15T20:23:47.956Z (3 months ago)
- Language: Elixir
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
To implement this, we will need the following core classes and functions:
1. `CommitSummarizerAction`: This is the main class that will handle the Github action. It will have methods to watch for commits, check for the "summarize" keyword, create a PR, get the diff of the commit, generate a summary using ChatGPT's API, and post the summary as a comment to the PR.
2. `watch_for_commits`: This method will watch for commits on the branches it's configured to watch.
3. `check_for_keyword`: This method will check for the "summarize" keyword in the commit.
4. `create_pr`: This method will create a PR for the branch.
5. `get_diff`: This method will get the diff contents of the commit.
6. `generate_summary`: This method will generate a high-level summary of the commit using ChatGPT's API.
7. `post_summary`: This method will post the summary as a comment to the PR.
Now, let's write the code for each of these components.
`mix.exs`