Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save eonist/16ad2f81387f7c61ff27f2b0a4071814 to your computer and use it in GitHub Desktop.

Select an option

Save eonist/16ad2f81387f7c61ff27f2b0a4071814 to your computer and use it in GitHub Desktop.
How Git Commit, PR and Release Enrichment Works

How Git Commit, PR and Release Enrichment Works

CLI Commit

Agent + git diff + 4 other enricher sources.

Fetch: git diff, files, websites, connectors, agent input (text transcript)

Process:

  1. We first combine git diff and agent transcripts to make a first pass.
  2. Then we analyze and query the AI model if it would add additional value if we read files, crawl the web or add info from GitHub.
  3. If the branch we work on has a PR, we look for issues mentioning this PR, and if these issues might have info we need, we can mention this issue in the commit if it's relevant.

Human source is not used in CLI commit.

App Commit

We do the same as CLI commit with the only difference that we don't use agent input and instead use human input.

With human input we can add prompt instruction via text input when pressing the preview button with options. This allows the user to emphasize how the commit description and title should be written.

There is also a way to touch-up the commit description after the preview has been generated, by selecting text and pressing the right mouse button to show the context menu, then pressing "Edit with AI". This will present the user with a prompt text input.

CLI Pull Request

We can make PRs by selecting source and target branches. The commit diff between these two branches constitutes the body of the PR.

Firstly we try to analyze what the commits accomplished. For smaller models like SFM and others we heavily truncate and interpolate. Using larger models yields better results that provide more nuances etc. Then we ask the AI if running passes with external sources can improve the PR description. We also look at the agent desktop transcript and combine this with the branch diff/commit text.

App Pull Requests

The app does the same as the CLI PR routine except accepting agent input. In the app we can also provide user input via the prompt input on the preview button. And once the text has been generated we can then use the AI touch-up feature to tweak things and pull in external knowledge from connectors we point to: add design tokens from Notion for instance, or reference similar PRs or relevant issues, or add API docs from a GitHub repo via the web crawler.

App Releases

To generate changelog, select the next tag and all commits from previous to current tag. Using the app to generate changelog is a great way to make releases.

For CI/CD we can use the release feature in CI. To learn more about how that works please visit this link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment