Jekyll2018-04-22T00:06:10+09:00https://srea.github.io/srealess is more.BotKitを使ってSlackからGithub Issueを作成する2018-03-24T00:00:00+09:002018-03-24T00:00:00+09:00https://srea.github.io/2018/03/24/botkit<h2 id="モチベ">モチベ</h2>
<p>GitHub Issue でバグなどを集約している場合に、エンジニア以外にも作って欲しいと思うことがあります。<br />
ただ、普段使わない人にまでGitHubを使わせるのは酷です。<br />
心理的障壁を取り除いて上げる必要がありそうです。</p>
<h2 id="何作ったか">何作ったか</h2>
<p>Slack から簡単に Github Issue を作れる Bot を作ってみました。<br />
<a href="https://github.com/srea/github-issue-bot-for-slack">https://github.com/srea/github-issue-bot-for-slack</a></p>
<p>OSSで公開されているものを組み合わせただけなので、大したことしてません。</p>
<p>メンション飛ばして、xx をするといったことが簡単に出来ます。<br />
何を自動化させるかはその個人やチームで違うと思うので話し合ってみると良いと思います。</p>
<p>人を楽にする Bot を作るのって大変だと思います。</p>
<h3 id="使った技術やossなど">使った技術やOSSなど</h3>
<ul>
<li><a href="https://github.com/howdyai/botkit">BotKit</a></li>
<li><a href="https://developer.github.com/v3/issues/#create-an-issue">GitHub API</a></li>
<li><a href="https://github.com/request/request-promise">request-promise</a></li>
<li><a href="https://github.com/foreverjs/forever">forever</a></li>
</ul>
<p>お試しで動かす分には Mac でも全く問題ないんですが、スリープすると接続切れます。<br />
なので 無料で使える <a href="https://cloud.google.com/free/">GCP</a> をうまく使って、デーモン化すると良いと思います。</p>
<h2 id="その他やりたいこと">その他やりたいこと</h2>
<ul>
<li>GitHub Project cards API を使った何か</li>
<li>TypeScript で型のある世界を</li>
</ul>
<h2 id="追記">追記</h2>
<p>漢字もプログラミング言語も読めるけど、書けないんですよ。<br />
あまり書かないから。書いていこう。</p>モチベfrom Jekyll-admin2018-03-12T00:00:00+09:002018-03-12T00:00:00+09:00https://srea.github.io/2018/03/12/from-jekyll-admin<p>しばらく放置していましたが、 jekyll をアップデートし再始動。</p>
<p>jekyll-admin :+1:</p>しばらく放置していましたが、 jekyll をアップデートし再始動。Hello World!2018-03-11T11:22:45+09:002018-03-11T11:22:45+09:00https://srea.github.io/2018/03/11/hello-world<figure class="highlight"><pre><code class="language-swift" data-lang="swift"><span class="k">while</span> <span class="kc">true</span> <span class="p">{</span>
<span class="k">try</span> <span class="n">challenge</span>
<span class="p">}</span></code></pre></figure>while true { try challenge }Welcome to Jekyll!2018-03-10T16:41:45+09:002018-03-10T16:41:45+09:00https://srea.github.io/jekyll/update/2018/03/10/welcome-to-jekyll<p>You’ll find this post in your <code class="highlighter-rouge">_posts</code> directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run <code class="highlighter-rouge">jekyll serve</code>, which launches a web server and auto-regenerates your site when a file is updated.</p>
<p>To add new posts, simply add a file in the <code class="highlighter-rouge">_posts</code> directory that follows the convention <code class="highlighter-rouge">YYYY-MM-DD-name-of-post.ext</code> and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.</p>
<p>Jekyll also offers powerful support for code snippets:</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="k">def</span> <span class="nf">print_hi</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
<span class="nb">puts</span> <span class="s2">"Hi, </span><span class="si">#{</span><span class="nb">name</span><span class="si">}</span><span class="s2">"</span>
<span class="k">end</span>
<span class="n">print_hi</span><span class="p">(</span><span class="s1">'Tom'</span><span class="p">)</span>
<span class="c1">#=> prints 'Hi, Tom' to STDOUT.</span></code></pre></figure>
<p>Check out the <a href="https://jekyllrb.com/docs/home">Jekyll docs</a> for more info on how to get the most out of Jekyll. File all bugs/feature requests at <a href="https://github.com/jekyll/jekyll">Jekyll’s GitHub repo</a>. If you have questions, you can ask them on <a href="https://talk.jekyllrb.com/">Jekyll Talk</a>.</p>You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.