<?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: LemonBrandy</title>
    <description>The latest articles on DEV Community by LemonBrandy (@lemonbrandy).</description>
    <link>https://dev.to/lemonbrandy</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%2F583926%2Fd9b7b6a8-d90d-46b9-8dc5-9f04ac6d224d.jpg</url>
      <title>DEV Community: LemonBrandy</title>
      <link>https://dev.to/lemonbrandy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lemonbrandy"/>
    <language>en</language>
    <item>
      <title>Made a GitLab code search tool, try it</title>
      <dc:creator>LemonBrandy</dc:creator>
      <pubDate>Thu, 25 Mar 2021 06:17:00 +0000</pubDate>
      <link>https://dev.to/lemonbrandy/open-source-gitlab-code-search-tool-1ej6</link>
      <guid>https://dev.to/lemonbrandy/open-source-gitlab-code-search-tool-1ej6</guid>
      <description>&lt;p&gt;Kooder is an open source code search project, offering code, repositories and issues search service for code hosting platforms including Gitee, GitLab and Gitea.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnizkmob6d62rrmiiobp5.png" class="article-body-image-wrapper"&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-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnizkmob6d62rrmiiobp5.png" alt="UI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are two modules, gateway and indexer. Gateway is integrated inside gateway under default config.&lt;/p&gt;

&lt;p&gt;Gateway:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accept index tasks from HTTP requests and put them in the queue after examing it&lt;/li&gt;
&lt;li&gt;Accept search requests and return their results back to the client&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Indexer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitor the index tasks inside the queue&lt;/li&gt;
&lt;li&gt;Update these add, delete and update index tasks back to the index library&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Logic Flow
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp2r1j6q5tya0cqato3cq.png" class="article-body-image-wrapper"&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-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp2r1j6q5tya0cqato3cq.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Use it in Gitlab
&lt;/h3&gt;

&lt;p&gt;Config following properties：&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gitlab.url = http://gitlab-host:gitlab-port/  
gitlab.personal_access_token = &amp;lt;root user personal access token&amp;gt;  
git.username = root  
git.password =  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kooder will use access token as the password if you don't offer one.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use it in Gitea
&lt;/h3&gt;

&lt;p&gt;1.Site Administration&lt;/p&gt;

&lt;p&gt;2.Add Gitea Webhook&lt;/p&gt;

&lt;p&gt;3.Set up Webhook&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set Target URL to  &lt;code&gt;http://kooder-ip:kooder-port/gitea&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Set POST Content Type to &lt;code&gt;POST + application/json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check&lt;code&gt;All Event&lt;/code&gt; or &lt;code&gt;Custom Events&lt;/code&gt; for the &lt;code&gt;Trigger On&lt;/code&gt; option. ( If you choose &lt;code&gt;Custom Events&lt;/code&gt;, you need to check &lt;code&gt;Repo&lt;/code&gt;, &lt;code&gt;Push&lt;/code&gt; and &lt;code&gt;Issue&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.Config following properties.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gitea.secret_token = &amp;lt;webhook secret token&amp;gt;
gitea.url = http://gitea-ip:prot/
gitea.personal_access_token = &amp;lt;admin user personal access token&amp;gt;
git.username = &amp;lt;admin username&amp;gt;
git.password = &amp;lt;admin password&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  More Info
&lt;/h3&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/oschina/kooder" rel="noopener noreferrer"&gt;https://github.com/oschina/kooder&lt;/a&gt;&lt;br&gt;
Gitee: &lt;a href="https://gitee.com/koode/kooder" rel="noopener noreferrer"&gt;https://gitee.com/koode/kooder&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>java</category>
      <category>githunt</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
