<?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: Seito Tanaka</title>
    <description>The latest articles on DEV Community by Seito Tanaka (@seachicken).</description>
    <link>https://dev.to/seachicken</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%2F247708%2F232d87dc-649a-4f26-909a-3ae7e0371861.jpeg</url>
      <title>DEV Community: Seito Tanaka</title>
      <link>https://dev.to/seachicken</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/seachicken"/>
    <language>en</language>
    <item>
      <title>Develop a consciousness of internal quality to maintain our productivity</title>
      <dc:creator>Seito Tanaka</dc:creator>
      <pubDate>Tue, 18 Jun 2024 13:27:00 +0000</pubDate>
      <link>https://dev.to/seachicken/develop-a-consciousness-of-internal-quality-to-maintain-our-productivity-2bpg</link>
      <guid>https://dev.to/seachicken/develop-a-consciousness-of-internal-quality-to-maintain-our-productivity-2bpg</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.tourl"&gt;&lt;/a&gt;I love coding because it allows me to create what I want from my imagination. But it's not fun when software design is more complex and buggy.&lt;br&gt;
Developers need to maintain maintainability by constantly checking the scope of impact when making changes to the code and continuing to test and refactor.&lt;br&gt;
This movement has senior developers who catch the &lt;a href="https://tidyfirst.substack.com/p/code-smells"&gt;code smells&lt;/a&gt;, but it is always difficult to be conscious of impacting code changes.&lt;br&gt;
We should easily know the impacting code changes to support developers.&lt;/p&gt;
&lt;h2&gt;
  
  
  The slowing pace of development
&lt;/h2&gt;

&lt;p&gt;As a developer, you've probably experienced the frustration of a service becoming more complex over time, leading to a slower pace of development.&lt;br&gt;
Even if it works fine when you add a feature, if the scope of the change is difficult to understand and the design is hard for future colleagues to understand, it will gradually become more likely to break.&lt;br&gt;
Creating unintended relationships in a program is easy, so maintaining maintainability within a team can be a tough challenge.&lt;/p&gt;
&lt;h2&gt;
  
  
  Developing while looking at the impact map
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://plugins.jetbrains.com/plugin/24358-inga"&gt;Inga plugin's Impact Map&lt;/a&gt; visualizes the modules and components affected by the developer's code changes in real-time.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/D1PpRi0yvKY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The impact can be checked in the following development phases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Individual development phase:&lt;/strong&gt;&lt;br&gt;
By integrating with the IDE, the Inga plugin empowers developers to develop while always being aware of the impact on the internal design. This control helps to prevent unintended negative effects, giving developers more confidence in their coding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Team code review phase:&lt;/strong&gt;&lt;br&gt;
Since the team, not the individual, protects the design, reports can be posted to a pull request by &lt;a href="https://github.com/seachicken/inga-action"&gt;CI&lt;/a&gt; so that the whole team can check the impact during code review.&lt;/p&gt;

&lt;p&gt;Inga will contribute to productivity. If you sympathize with this concept, you can try it out without hesitation, as it is free. Also, since code analysis is performed entirely on the local machine, you can use it with peace of mind. We welcome feedback on both good and bad points. Thank you.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.martinfowler.com/articles/is-quality-worth-cost.html"&gt;https://www.martinfowler.com/articles/is-quality-worth-cost.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>codequality</category>
    </item>
    <item>
      <title>Visualizing Service Maps with Static Analysis</title>
      <dc:creator>Seito Tanaka</dc:creator>
      <pubDate>Sun, 31 Mar 2024 05:49:00 +0000</pubDate>
      <link>https://dev.to/seachicken/visualizing-service-maps-with-static-analysis-27ji</link>
      <guid>https://dev.to/seachicken/visualizing-service-maps-with-static-analysis-27ji</guid>
      <description>&lt;p&gt;I created a new feature to visualize service maps on &lt;a href="https://github.com/seachicken/inga"&gt;Inga&lt;/a&gt;. This tool can help the developer by visualizing impacted endpoints from code changes.&lt;br&gt;
Now, I supported analysis for SOA (e.g., microservices), which can find relationships if they are separated from HTTP requests.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi96igkh3g1buvdqrq67b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi96igkh3g1buvdqrq67b.png" alt="Inga service maps" width="800" height="323"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How to Get Service Maps
&lt;/h2&gt;

&lt;p&gt;Similar features have tools, for example, &lt;a href="https://about.codecov.io/blog/impact-analysis-open-beta/"&gt;Codecov&lt;/a&gt;, &lt;a href="https://www.codesee.io/"&gt;CodeSee&lt;/a&gt;, and &lt;a href="https://appmap.io/"&gt;AppMap&lt;/a&gt;, which tools require runtime information, such as OpenTelemetry tracing data. The analysis approach for Inga does not require runtime information; it uses static code analysis only. Thus, safe as it does not require sensitive data on your system.&lt;br&gt;
However, using static analysis has difficult challenges. If get relationships between services, the below info is required with servers and clients:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;method (e.g., GET, POST..)&lt;/li&gt;
&lt;li&gt;path (e.g., "/users/{id}")&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, if you have the below client call, Inga found the &lt;code&gt;getForObject&lt;/code&gt; API is a GET method and finds path definitions from &lt;code&gt;uri&lt;/code&gt; variable references.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;restTemplate&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getForObject&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Java, there are many HTTP clients such as RestTemplate and WebClient, so it is difficult to support all APIs, but I believe that the number of commonly used client libraries is limited to some extent, so this analysis method is adopted.&lt;/p&gt;

&lt;p&gt;Inga is still in beta, if you're interested, check out &lt;a href="https://www.patreon.com/seachicken"&gt;my Patreon&lt;/a&gt; 😄&lt;/p&gt;

&lt;p&gt;GitHub:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/seachicken/inga"&gt;https://github.com/seachicken/inga&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/seachicken/inga-ui"&gt;https://github.com/seachicken/inga-ui&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>codereview</category>
      <category>codequality</category>
    </item>
    <item>
      <title>Visualizing the Impact of Code Changes</title>
      <dc:creator>Seito Tanaka</dc:creator>
      <pubDate>Fri, 26 May 2023 15:07:18 +0000</pubDate>
      <link>https://dev.to/seachicken/visualizing-the-impact-of-code-changes-2kan</link>
      <guid>https://dev.to/seachicken/visualizing-the-impact-of-code-changes-2kan</guid>
      <description>&lt;p&gt;Have you ever encountered a problem where modifying your code inadvertently affected other parts of your program? I have been working on the development of an open-source static analysis tool called &lt;a href="https://github.com/seachicken/inga" rel="noopener noreferrer"&gt;Inga&lt;/a&gt;. Its purpose is to automate the visualization of API endpoints and UI components influenced by code changes in a continuous integration (CI) environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is AST?
&lt;/h2&gt;

&lt;p&gt;To better understand how code analysis works, let's start by discussing the concept of an Abstract Syntax Tree (AST). When working with code, it is challenging to identify code references and analyze the structure solely based on characters. Therefore, before performing code analysis, we convert the code into AST, which represents the code's structure in a tree-like format.&lt;br&gt;
AST contains the following essential data:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type (e.g., class, method)&lt;/li&gt;
&lt;li&gt;Name&lt;/li&gt;
&lt;li&gt;Code range&lt;/li&gt;
&lt;li&gt;Child nodes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  How to find the Impact of Code Changes
&lt;/h2&gt;

&lt;p&gt;Now, let's explore how we find the affected code changes using AST. Two key aspects are to consider: definitions (such as methods or members) and references. We compare the code and the AST.&lt;/p&gt;
&lt;h3&gt;
  
  
  Find Definitions
&lt;/h3&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;For example, if we make a code change within the block of the &lt;code&gt;create&lt;/code&gt; method, we can locate the affected definition by examining the start and end text positions of the corresponding AST node.&lt;br&gt;
However, finding references is more complex. Since &lt;code&gt;create&lt;/code&gt; can be defined in multiple places within a project, we cannot rely on a simple search.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;process&lt;/th&gt;
&lt;th&gt;found name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Get package node name&lt;/td&gt;
&lt;td&gt;app.service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Get class node name&lt;/td&gt;
&lt;td&gt;app.service.Order&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Get method node name&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;app.service.Order.create&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Find References
&lt;/h3&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;To find the method invocation, we search for a specific type of AST node that corresponds to the method call. In this case, we are looking for a node that matches the target method name &lt;code&gt;create&lt;/code&gt;, which we have just searched for. From there, we can traverse the tree upwards to determine the class name and eventually obtain the unique name "app.service.Order.create," which is associated with the target definition.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;process&lt;/th&gt;
&lt;th&gt;found name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Find the &lt;code&gt;create&lt;/code&gt; method call&lt;/td&gt;
&lt;td&gt;create&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Find the class definition of the &lt;code&gt;order&lt;/code&gt; member&lt;/td&gt;
&lt;td&gt;Order.create&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Find imports for &lt;code&gt;Order&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;app.service.Order.create&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We can determine the entry points of call references by utilizing a cyclomatic approach to identify unique names within both definitions and references. This analysis technique allows us to work with projects written in multiple languages such as Java and Kotlin.&lt;br&gt;
Inga is currently under development. If you find this tool interesting, please consider giving it a star ⭐️ and providing feedback. Thank you!&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/seachicken" rel="noopener noreferrer"&gt;
        seachicken
      &lt;/a&gt; / &lt;a href="https://github.com/seachicken/inga" rel="noopener noreferrer"&gt;
        inga
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Visualizing the Impact of Code Changes
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/seachicken/inga.github/logo.png"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fseachicken%2Finga.github%2Flogo.png" width="100"&gt;&lt;/a&gt; Inga&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/seachicken/inga/actions/workflows/ci.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/seachicken/inga/actions/workflows/ci.yml/badge.svg" alt="CI"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A static analysis tool that searches references from changed code to detect entry points that have a strong impact on the user.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why?&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Code changes daily, and it is always important to check the impact of changes
In many cases, checking the impact of a change depends on how vigilant the author is in writing the code, making it difficult to detect unintended effects during the code review and QA phases.
This tool improves software quality by detecting unintended changes at an early phase.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Supported Languages&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Java&lt;/li&gt;
&lt;li&gt;JavaScript&lt;/li&gt;
&lt;li&gt;Kotlin&lt;/li&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Usage&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;inga [options]&lt;/pre&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Options&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;&lt;code&gt;--diff &amp;lt;string&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Analyze the result of &lt;code&gt;git diff --unified=0&lt;/code&gt; (use "-" to read from standard input)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;--root-path &amp;lt;string&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Relative path of the project to be analyzed, so if you do not give this option, it defaults to the command execute path.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;--include &amp;lt;string&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Filenames of glob pattern matching to include from analysis. (e.g. "core/**/*.ts")&lt;/p&gt;
&lt;p&gt;&lt;code&gt;--exclude&lt;/code&gt;…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/seachicken/inga" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>opensource</category>
      <category>ci</category>
      <category>cli</category>
    </item>
    <item>
      <title>Visualize code changes and impact on users</title>
      <dc:creator>Seito Tanaka</dc:creator>
      <pubDate>Fri, 23 Sep 2022 23:49:18 +0000</pubDate>
      <link>https://dev.to/seachicken/visualize-code-changes-and-impact-on-users-1ci7</link>
      <guid>https://dev.to/seachicken/visualize-code-changes-and-impact-on-users-1ci7</guid>
      <description>&lt;p&gt;Code changes daily, and it is always important to check the impact of changes.&lt;br&gt;
In many cases, the process of checking the impact of a change depends on how vigilant the author is in writing the code, making it difficult to detect unintended effects during the code review and QA phases.&lt;/p&gt;

&lt;p&gt;I created &lt;a href="https://github.com/seachicken/inga"&gt;Inga&lt;/a&gt;. This tool improves software quality by detecting unintended changes at an early phase.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Inga takes the code diff and parses it into AST to find functions and variables that are affected by the change. It then uses Language Server Protocol (LSP), which supports many languages, to further search for references.&lt;br&gt;
Currently, when you submit Pull Requests, you can have CI run Inga and automatically comment analysis results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;p&gt;Currently, the front-end is only supported for projects written in React + TypeScript and the back-end for projects written in Java, but other support can be technically increased.&lt;br&gt;
In the future, it would be interesting to be able to trace the impact of changes to the back-end on the front-end. If you are interested in this project, please post your ideas on GitHub Discussions ☕️&lt;/p&gt;

</description>
      <category>tooling</category>
      <category>codequality</category>
      <category>codereview</category>
    </item>
    <item>
      <title>Safely clean up your local branches</title>
      <dc:creator>Seito Tanaka</dc:creator>
      <pubDate>Sun, 07 Nov 2021 02:18:21 +0000</pubDate>
      <link>https://dev.to/seachicken/safely-clean-up-your-local-branches-9i3</link>
      <guid>https://dev.to/seachicken/safely-clean-up-your-local-branches-9i3</guid>
      <description>&lt;p&gt;If you squash-merge a branch, you can't delete it in the usual way, &lt;code&gt;git branch -d&lt;/code&gt;, because there is no history of merging into the default branch.&lt;br&gt;
In the figure below, squash-merge the commit on your topic branch, D, and it's merged into your default branch as a new commit, E. Then the git history becomes a child of B, and it loses its relevance to the topic branch.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;To delete a topic branch that has lost its merge history, you must forcibly delete with &lt;code&gt;git branch -D&lt;/code&gt;, and you are always worried that you might accidentally delete another branch you are working on.&lt;/p&gt;

&lt;p&gt;To solve this problem, I created a tool called &lt;a href="https://github.com/seachicken/gh-poi"&gt;gh poi&lt;/a&gt; ("poi" means "feel free to throw it away" in Japanese).&lt;/p&gt;

&lt;h2&gt;
  
  
  What tools?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;gh poi&lt;/code&gt; is an extension that runs as a subcommand of the &lt;a href="https://github.com/cli/cli"&gt;GitHub CLI&lt;/a&gt;, which is officially provided by GitHub.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;
&lt;br&gt;
GitHub CLI v2.0.0 (released August 2021) and later versions allow you to develop and install extensions.&lt;br&gt;
By providing it as an extension, you don't need to issue an access token to GitHub for each tool and can use it easily.
&lt;h2&gt;
  
  
  Deletion strategy
&lt;/h2&gt;

&lt;p&gt;As mentioned earlier, squash-merge branches can only be deleted by forcibly delete. Since &lt;code&gt;gh poi&lt;/code&gt; also executes forced deletion internally, it is important to correctly determine the branch to delete.&lt;/p&gt;
&lt;h3&gt;
  
  
  Deletion flow
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Use &lt;a href="https://cli.github.com/manual/gh_repo_view"&gt;gh repo view&lt;/a&gt; to get the remote repository name &lt;/li&gt;
&lt;li&gt;Use the &lt;code&gt;git&lt;/code&gt; command to get a list of commit hashes for the branches that exist in the current directory&lt;/li&gt;
&lt;li&gt;Use &lt;a href="https://cli.github.com/manual/gh_api"&gt;gh api&lt;/a&gt; to search for all the pull requests associated with the repository name and commit hash mentioned above&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Determine deletion&lt;/strong&gt; branches and execute based on search results&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  How to determine deletion
&lt;/h3&gt;

&lt;p&gt;The GitHub API is used to check the pull requests associated with the head commit hash in each local branch, and if the status of the pull request is merged, the local work is considered complete and can be deleted. Since it uses the GitHub API, the best feature of it is that it can determine the deletion of any merge method including "Squash and merge".&lt;br&gt;
In some cases, a pull request is closed and a new pull request is created. In this case, there will be multiple pull requests related to the branch, but if there is at least one pull request that has been merged and all other related branches are closed, it is determined that the branch can be deleted.&lt;br&gt;
If there are still open pull requests, they are not included in the deletion list because they may continue to be worked on locally. We can easily run &lt;code&gt;gh poi&lt;/code&gt; at any time to clean up the working environment.&lt;/p&gt;

&lt;p&gt;In addition, if there is a forked repository in the first step, it also gets the name of the upstream repository, so it can make the same deletion decision when we merged the pull request to the forked repository. This is useful when contributing to OSS.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;





&lt;p&gt;I found a few ways to delete squash-merge branches, but I couldn't find a tool that worked with GitHub and could delete them cleanly as expected, so I decided to make my own.&lt;br&gt;
If you are interested in this project, please also register for ⭐️ Star from &lt;a href="https://github.com/seachicken/gh-poi"&gt;gh-poi&lt;/a&gt;.&lt;br&gt;
Thanks for reading ☕️&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>go</category>
    </item>
  </channel>
</rss>
