Giter Site home page Giter Site logo

gpt-commit-summarizer's People

Contributors

kanhari avatar soof-golan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gpt-commit-summarizer's Issues

Very large diff returns an error

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)

Request: Option for more condensed summary

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.

Quick test reports incorrect diff summary

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.

Non nodejs install?

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..

Not able to write the summary automatically

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
},

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.