<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mad Mirrajabi</title>
    <description>The latest articles on DEV Community by Mad Mirrajabi (@mirrajabi).</description>
    <link>https://dev.to/mirrajabi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1093033%2F053cd4eb-3c4b-4fa6-89d8-61a9ed7008d4.jpeg</url>
      <title>DEV Community: Mad Mirrajabi</title>
      <link>https://dev.to/mirrajabi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mirrajabi"/>
    <language>en</language>
    <item>
      <title>Let AI generate Pull Requests from your GitHub issues!</title>
      <dc:creator>Mad Mirrajabi</dc:creator>
      <pubDate>Sat, 30 Dec 2023 17:53:27 +0000</pubDate>
      <link>https://dev.to/mirrajabi/let-ai-generate-pull-requests-from-your-github-issues-4hgk</link>
      <guid>https://dev.to/mirrajabi/let-ai-generate-pull-requests-from-your-github-issues-4hgk</guid>
      <description>&lt;p&gt;It's time we all stop wasting time on those small and medium-sized tasks that make our day miserable. Create small issues and let AI deal with them.&lt;/p&gt;

&lt;p&gt;My (probably) last gift of 2023 for you all is a GitHub action + workflow which generates Pull Requests from your GitHub issues!&lt;/p&gt;

&lt;p&gt;Check them out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/mirrajabi/aider-github-action" rel="noopener noreferrer"&gt;aider-github-action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/mirrajabi/aider-github-workflows" rel="noopener noreferrer"&gt;aider-github-workflows&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://aider.chat/" rel="noopener noreferrer"&gt;Aider&lt;/a&gt; is a coding assistant that handles all the prompting and communication with OpenAI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;Follow &lt;a href="https://github.com/mirrajabi/aider-github-workflows/blob/main/docs/issue-to-pr.md" rel="noopener noreferrer"&gt;the instruction's to add the 'aider-issue-to-pr' workflow to your project&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And that's all the setup you need to do!&lt;/p&gt;

&lt;p&gt;Now let's test things out.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a GitHub issue and assign &lt;code&gt;aider&lt;/code&gt; label to it.&lt;/li&gt;
&lt;li&gt;An action automatically runs when the label is added and commits requested changes to the source code on a new branch. Lastly, it creates a pull-request for you to review.&lt;/li&gt;
&lt;li&gt;You review the code, possibly tweak it and merge it!&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;p&gt;I've created an example repo to demonstrate the full flow. See the &lt;a href="https://github.com/mirrajabi/aider-github-workflows-test" rel="noopener noreferrer"&gt;readme of this repo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it work under the hood?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/mirrajabi/aider-github-action" rel="noopener noreferrer"&gt;aider-github-action&lt;/a&gt; runs aider in a container and runs a single prompt on it, commits, and pushes its changes on a branch that you pass to it as an input.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/mirrajabi/aider-github-workflows" rel="noopener noreferrer"&gt;aider-github-workflows&lt;/a&gt; uses &lt;a href="https://github.com/mirrajabi/aider-github-action" rel="noopener noreferrer"&gt;aider-github-action&lt;/a&gt; to facilitate the creation of pull requests and new branches.&lt;/p&gt;

&lt;p&gt;For more information see the documentation and the source code of these repos. They are currently very small and simple to review!&lt;/p&gt;

&lt;h2&gt;
  
  
  How much OpenAI credit does it cost?
&lt;/h2&gt;

&lt;p&gt;I was positively surprised when I first started using &lt;a href="https://aider.chat/" rel="noopener noreferrer"&gt;Aider&lt;/a&gt;! I had 10 chats about some quite large changes and it only cost me less than $0.5 even though I was using the latest GPT-4 Turbo model (&lt;code&gt;gpt-4-1106-preview&lt;/code&gt;). Aider optimises the prompts and only &lt;a href="https://aider.chat/docs/unified-diffs.html" rel="noopener noreferrer"&gt;works with diffs rather than generating whole files&lt;/a&gt;. It also &lt;a href="https://aider.chat/docs/repomap.html" rel="noopener noreferrer"&gt;sends a map of your project&lt;/a&gt; to GPT instead of whole files. All of these nice features make it a great tool to use on larger code bases with really low cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Future of the project
&lt;/h2&gt;

&lt;p&gt;I'm pretty sure GitHub will very soon make their own better version of "Issue to PR" tool available to those with either a GitHub copilot or Pro plans but until then, I think it's nice to have this open-source alternative.&lt;/p&gt;

</description>
      <category>githubactions</category>
      <category>ai</category>
      <category>automation</category>
      <category>llm</category>
    </item>
  </channel>
</rss>
