kanhari / gpt-commit-summarizer Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Feature request: Append the total token used at the end of the summary.
I got an "Error: OpenAI query too big" testing it with a large xml file with a bunch of changes.
Maybe limit the diff to a reasonable size and include a note that it was trimmed?
(Very cool by the way)
I work mainly as a solo developer, as such I rarely pull request for myself. It would be great if this would simply write my commit messages for me without having to make a pull request.
This is in many ways super userful, so thanks for that 🙌 One thought, it would be useful with less verbose output or fewer comments i.e. having only one summary. Would also be great if updates to PRs would close or delete outdated summaries.
saw this on reddit (cool project btw 😄), thought I'd provide feedback from a quick test I ran today in a personal repo. I introduced the following diff (adding a key to a python dict):
- 'F64': 'double'
+ 'F64': 'double',
+ 'F128': '_uint128_t'
but the summary was:
Added F128 to the dictionary of type mappings.
Changed the type mapping for F64 from double to _uint128_t.
but F64's value wasn't changed, F128 was only introduced.
Not sure what else to add here. Thought it might be useful for further tuning the query sent to openai.
Some way to install this in a repo without installing nodejs would be wonderful.. Possible to just fork a repo with it setup already and edit the config? Not really sure about github actions details..
Follow the steps detailed, but need help to see the requested result. When the action gets called, it reports 404 error:
Request failed with status code 404. Looks like the API call to a resource is not available for some reasons. Could you help in this case please. Thanks
GPT summary:
Error: couldn't generate summary
PR summary so far:
Error: couldn't generate summary
Action logs:
OpenAI file summary prompt for 2023-12-19/BinaryGap/Program.cs:
You are an expert programmer, and you are trying to summarize a git diff.
Reminders about the git diff format:
For every file, there are a few metadata lines, like (for example):
diff --git a/lib/index.js b/lib/index.js
index aadf691..bfef603 100644
--- a/lib/index.js
+++ b/lib/index.js
This means that lib/index.js
was modified in this commit. Note that this is only an example.
Then there is a specifier of the lines that were modified.
A line starting with +
means it was added.
A line that starting with -
means that line was deleted.
A line that starts with neither +
nor -
is code given for context and better understanding.
It is not part of the diff.
The following is a git diff of a single file.
Please summarize it in a comment, describing the changes made in the diff in high level.
Do it in the following way:
Write SUMMARY:
and then write a summary of the changes made in the diff, as a bullet point list.
Every bullet point should start with a *
.
THE GIT DIFF OF 2023-12-19/BinaryGap/Program.cs TO BE SUMMARIZED:
@@ -1,10 +1,15 @@
-namespace BinaryGap
+using System.ComponentModel;
+
+namespace BinaryGap
{
internal class Program
{
static void Main(string[] args)
{
//convert number to binary
+ //Just adding this comment to test git
+ //Add more comments here
+ //Add more testing here
Console.WriteLine(Result(9));
}
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 1603,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'api.openai.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.openai.com',
_closeAfterHandlingError: false,
_readableState: [ReadableState],
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular *1],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(async_id_symbol)]: 1[8](https://github.com/serumhyb/ProgrammingPractice/actions/runs/7639785575/job/20813537931?pr=2#step:2:9)0,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kSetNoDelay)]: false,
[Symbol(kSetKeepAlive)]: true,
[Symbol(kSetKeepAliveInitialDelay)]: 60,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object],
[Symbol(RequestTimeout)]: undefined
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.