<?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: Pedro Mutter</title>
    <description>The latest articles on DEV Community by Pedro Mutter (@mutterpedro).</description>
    <link>https://dev.to/mutterpedro</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%2F267230%2F902c2410-84a6-4c04-9b68-3a500472df4b.jpeg</url>
      <title>DEV Community: Pedro Mutter</title>
      <link>https://dev.to/mutterpedro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mutterpedro"/>
    <language>en</language>
    <item>
      <title>You should try GitHub Actions Now!</title>
      <dc:creator>Pedro Mutter</dc:creator>
      <pubDate>Thu, 19 Mar 2020 22:33:12 +0000</pubDate>
      <link>https://dev.to/mutterpedro/you-should-try-github-actions-now-1i48</link>
      <guid>https://dev.to/mutterpedro/you-should-try-github-actions-now-1i48</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Talking to my teammates here at Catho, a discussion arose about the tests and linters that should be run by the reviewers when there was a new PR in our new project.&lt;/p&gt;

&lt;p&gt;We know that there are several tools that automate this process, but our use case is very specific and we would need to keep opening calls to ask for authorization to install these tools/bots. Then someone commented on &lt;strong&gt;GitHub Actions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I had heard of them, but I had no idea of their flexibility and simplicity, I decided to study a little about them and then I had an idea to create an action that would solve our use case and still help me to understand how a GitHub Action works. And so &lt;a href="https://github.com/marketplace/actions/var-js"&gt;VAR.js&lt;/a&gt; was born, if you can give it a star, I'll be happy 😊.&lt;/p&gt;

&lt;p&gt;VAR.js in "action":&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LozC8ZpO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8phmty3wmodsmhmpk7kz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LozC8ZpO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8phmty3wmodsmhmpk7kz.png" alt="VAR.js in action"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Create your own!
&lt;/h2&gt;

&lt;p&gt;GitHub gives awesome documentation that you can easily get started with only it to create your own action, &lt;a href="https://help.github.com/en/actions"&gt;take a look&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you want to create your action but is lazy to follow the documentation, GitHub also provides a very funny and interactive course to create your first &lt;strong&gt;hello-world&lt;/strong&gt; action, you can do it in less than an hour and at the end, you will have a ready functional basic structure of an action project, &lt;a href="https://lab.github.com/github/hello-github-actions!"&gt;take a look&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you want a little more motivation, GitHub is also promoting a &lt;strong&gt;hackathon&lt;/strong&gt; just about actions, if you have a good idea, I really encourage you to hurry and submit your action, entries will be accepted until &lt;strong&gt;31/03&lt;/strong&gt;, &lt;a href="https://githubhackathon.com/"&gt;check it now&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Using an action
&lt;/h2&gt;

&lt;p&gt;To use an action is very very very simple. You only need to create a folder on your project root called &lt;code&gt;.github&lt;/code&gt; and inside it, another folder called &lt;code&gt;workflows&lt;/code&gt;, and then inside this folder, you will create a &lt;strong&gt;YAML&lt;/strong&gt; file, containing specifications of the actions you want to &lt;strong&gt;run&lt;/strong&gt; and &lt;strong&gt;when&lt;/strong&gt;, here are an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Your workflow&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;push&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pull_request&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;lint&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Linting project&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;VAR.js&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;MutterPedro/varjs@v1.0.1&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;SCRIPT&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;format"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Here I am running my action &lt;strong&gt;VAR.js&lt;/strong&gt; when there is a new &lt;strong&gt;push&lt;/strong&gt; or a &lt;strong&gt;pull request&lt;/strong&gt; in my project. You can find more information about the meaning of these specifications and folders pattern on the documentation and the course I mentioned above.&lt;/p&gt;

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

&lt;p&gt;In addition, I was delighted with GitHub Action and strongly bet on its growth in the near future. We already have a huge diversity of actions, but it is just the beginning.&lt;/p&gt;

</description>
      <category>github</category>
      <category>javascript</category>
      <category>cicds</category>
      <category>githubactions</category>
    </item>
    <item>
      <title>Typescript Decorators for HTTP Server controllers and routes</title>
      <dc:creator>Pedro Mutter</dc:creator>
      <pubDate>Thu, 07 Nov 2019 21:00:55 +0000</pubDate>
      <link>https://dev.to/mutterpedro/typescript-decorators-for-http-server-controllers-and-routes-4ek4</link>
      <guid>https://dev.to/mutterpedro/typescript-decorators-for-http-server-controllers-and-routes-4ek4</guid>
      <description>&lt;p&gt;Backend devs, I launched a library to create HTTP routes in a very simply and directly way on an express server, using only Typescript decorators. I would like your opinions, reviews, tips and so on. If you can leave a star, would make me happy!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/MutterPedro/digjoy"&gt;https://github.com/MutterPedro/digjoy&lt;/a&gt;&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>node</category>
      <category>decorators</category>
      <category>express</category>
    </item>
  </channel>
</rss>
