<?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: Gustavo Araujo</title>
    <description>The latest articles on DEV Community by Gustavo Araujo (@garaujodev).</description>
    <link>https://dev.to/garaujodev</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%2F185424%2F7b84f44e-e4cf-43cf-bd25-0a9d26019111.jpg</url>
      <title>DEV Community: Gustavo Araujo</title>
      <link>https://dev.to/garaujodev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/garaujodev"/>
    <language>en</language>
    <item>
      <title>Code Review Best Practices: When (and When Not) to Use "Request Changes"</title>
      <dc:creator>Gustavo Araujo</dc:creator>
      <pubDate>Wed, 29 Oct 2025 14:09:03 +0000</pubDate>
      <link>https://dev.to/garaujodev/code-review-best-practices-when-and-when-not-to-use-request-changes-p04</link>
      <guid>https://dev.to/garaujodev/code-review-best-practices-when-and-when-not-to-use-request-changes-p04</guid>
      <description>&lt;p&gt;A code review is meant to help teams write better code together. But when reviewers misuse the “Request Changes” button, it turns a learning process into a power move, and &lt;strong&gt;code reviews aren’t about control, they’re about collaboration&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When you open a pull request, you’re saying &lt;em&gt;"Hey, here’s my idea — what do you think?"&lt;/em&gt;. You’re open to feedback (and hopefully expecting it). That’s how teams grow together and keep their codebase healthy.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Real Purpose of Code Reviews&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;At their core, code reviews serve two simple principles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Write code for people, not machines.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your teammates should be able to understand your code without decoding your brain.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Share knowledge and align understanding.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every review is a chance to spread context — not just spot mistakes.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If your review doesn’t move the team forward on at least one of these two fronts, it’s probably not doing its job.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Not Every Comment Deserves a "Request Changes"&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;During a review, you’ll often find things you’d write differently. That’s natural.&lt;/p&gt;

&lt;p&gt;We all have preferences — naming styles, indentation, function length, code structure. But your way isn’t always &lt;em&gt;the&lt;/em&gt; way. And that’s where many reviewers slip into “authority mode.”&lt;/p&gt;

&lt;p&gt;When you hit &lt;strong&gt;Request Changes&lt;/strong&gt; for something subjective, you stop the flow of collaboration. You’re not saying &lt;em&gt;"Here’s an idea to discuss"&lt;/em&gt; — you’re saying &lt;em&gt;"My way or the highway."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That button literally blocks the PR from merging until you approve it again. It’s a tool for addressing critical issues, not for expressing opinions.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;When “Request Changes” Makes Sense&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;There are legitimate times to use it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The code breaks the build or could harm production.&lt;/li&gt;
&lt;li&gt;There’s a security risk.&lt;/li&gt;
&lt;li&gt;It violates a major architectural rule that needs immediate attention.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In those cases, you’re protecting the system, not your ego.&lt;/p&gt;

&lt;p&gt;Use “Request Changes” to safeguard the environment, not to enforce personal taste.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;For Everything Else: Start a Conversation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If your feedback is about code design, naming, or readability, explain &lt;em&gt;why&lt;/em&gt; it matters. Reference documentation, articles, or past discussions that give your opinion context. A simple “I’d prefer it this way” doesn’t teach anyone anything.&lt;/p&gt;

&lt;p&gt;When feedback feels like an exchange instead of a rejection, it builds trust, and trust leads to better code.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Standardize What’s Subjective&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If the same style debates keep coming up, automate them.&lt;/p&gt;

&lt;p&gt;Set up linters and formatters in your CI pipeline. That removes bikeshedding from the human layer and frees reviews to focus on what really matters: &lt;strong&gt;logic, architecture, and clarity.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;A Small Tip: Try Conventional Comments&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you want to make your review comments clearer and friendlier, check out &lt;a href="https://conventionalcomments.org/" rel="noopener noreferrer"&gt;Conventional Comments&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It helps you structure feedback with prefixes like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nitpick: for small suggestions&lt;/li&gt;
&lt;li&gt;question: for clarifications&lt;/li&gt;
&lt;li&gt;suggestion: for improvements&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This format makes your intent explicit and keeps discussions constructive.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Final Thought&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Don’t Weaponize the Request Changes button in Code Reviews. A good review isn’t about winning an argument, it’s about helping each other write better software.&lt;br&gt;
Avoid “Request Changes” unless the system truly depends on it. Everything else deserves a conversation, not a command.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>software</category>
      <category>git</category>
      <category>collaboration</category>
    </item>
    <item>
      <title>GitHub's notifications on your Discord Server</title>
      <dc:creator>Gustavo Araujo</dc:creator>
      <pubDate>Fri, 01 Apr 2022 01:02:09 +0000</pubDate>
      <link>https://dev.to/garaujodev/githubs-notifications-on-your-discord-server-441h</link>
      <guid>https://dev.to/garaujodev/githubs-notifications-on-your-discord-server-441h</guid>
      <description>&lt;p&gt;I really love Discord and use it as a communication tool for personal projects with my friends and teammates. Sometimes I wonder: Do we have an App for Discord equivalent to GitHub App for Slack (former Pull Panda)?&lt;/p&gt;

&lt;p&gt;So, I noticed that actually we don’t have it, for simple reasons: We can integrate GitHub Webhook to send events directly to Discord Webhook. Simple and functional. So, let's do it!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Create the Webhook&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first step is to create the Webhook on your Discord server to receive the events from GitHub:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to your discord &lt;code&gt;Server Settings&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;Click on the &lt;code&gt;Integrations&lt;/code&gt; item on the sidebar;&lt;/li&gt;
&lt;li&gt;Hit the &lt;code&gt;Create Webhook&lt;/code&gt; button;&lt;/li&gt;
&lt;li&gt;Fill the &lt;code&gt;name&lt;/code&gt; field (I used &lt;code&gt;GitHub Integration&lt;/code&gt;) and select a channel to post the messages;&lt;/li&gt;
&lt;li&gt;Click on &lt;code&gt;Save Changes&lt;/code&gt; button;&lt;/li&gt;
&lt;li&gt;Then click on &lt;code&gt;Copy Webhook URL&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F7jnrflzg6hd9wlidftwc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F7jnrflzg6hd9wlidftwc.gif" alt="Set up your webhook on Discord" width="590" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Set up the Webhook on GitHub&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, you’ll need to configure GitHub to send the events to Discord Webhook:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to your organization (or repository) on GitHub&lt;/li&gt;
&lt;li&gt;Click the &lt;code&gt;Settings&lt;/code&gt; tab;&lt;/li&gt;
&lt;li&gt;Click the &lt;code&gt;Webhooks&lt;/code&gt; item on sidebar;&lt;/li&gt;
&lt;li&gt;Hit the &lt;code&gt;Add Webhook&lt;/code&gt; button on the top of the page;&lt;/li&gt;
&lt;li&gt;Fill the &lt;code&gt;Payload URL&lt;/code&gt; field with the URL copied in the step above (Step 1);&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;/github&lt;/code&gt; at the end of the URL (&lt;strong&gt;It’s very important!&lt;/strong&gt;);&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;Content Type&lt;/code&gt; select &lt;code&gt;Application/JSON&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;You can leave the &lt;code&gt;Secret&lt;/code&gt; field empty;&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;Event Triggers&lt;/code&gt; if you select:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Just the push event&lt;/code&gt; you’ll receive new pushed commits.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Everything&lt;/code&gt; you’ll receive everything, like new Pull Requests opened, workflows, etc.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Let me select individual events&lt;/code&gt; you can choose.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Hit the &lt;code&gt;Add Webhook&lt;/code&gt; button.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fv7ey0r70hv9zbtv1wwtr.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fv7ey0r70hv9zbtv1wwtr.gif" alt="Create your webhook on GitHub" width="600" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You’re all set! You’ll get GitHub events notifications on your Discord channel.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fs8f83arly89hdptrruv1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fs8f83arly89hdptrruv1.png" alt="You're all set!" width="419" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have any questions, you can reach me on &lt;a href="https://twitter.com/garaujodev" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, or you can just use the comments section below 🙂&lt;/p&gt;

&lt;p&gt;I hope I was helpful, and thank you for reading.&lt;/p&gt;

</description>
      <category>discord</category>
      <category>github</category>
      <category>tutorial</category>
      <category>integration</category>
    </item>
    <item>
      <title>RuboCop: How to install and configure</title>
      <dc:creator>Gustavo Araujo</dc:creator>
      <pubDate>Tue, 15 Mar 2022 14:07:51 +0000</pubDate>
      <link>https://dev.to/sourcelevel/rubocop-how-to-install-and-configure-3cbi</link>
      <guid>https://dev.to/sourcelevel/rubocop-how-to-install-and-configure-3cbi</guid>
      <description>&lt;p&gt;That Code quality is important, and any high-performing team knows it, but do you follow a guideline to standardize your codebase and make sure that everyone is going and looking in the same direction?&lt;/p&gt;

&lt;p&gt;Making a brief introduction, this is the goal of a linter: A tool that analyzes your source code to identify programming errors, bugs, and suspicious constructions &lt;em&gt;(&lt;a href="https://en.wikipedia.org/wiki/Lint_(software)" rel="noopener noreferrer"&gt;Wikipedia&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The main objective is to ensure that your code follows the same rules and practices, to look like the entire code was written by the same person.&lt;/p&gt;

&lt;p&gt;In a large variety of linters from Ruby, we have &lt;strong&gt;&lt;a href="https://github.com/rubocop/rubocop/" rel="noopener noreferrer"&gt;RuboCop&lt;/a&gt;&lt;/strong&gt; (available as a gem) that follows the best practices described in &lt;a href="https://rubystyle.guide/" rel="noopener noreferrer"&gt;The Ruby Style Guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One of the advantages of using a linter is to save time reviewing code because it prevents small issues like inconsistent variable names and practices during the development process. With that, the code review is more efficient, and it can be focused on implementations and features requirements.&lt;/p&gt;

&lt;p&gt;Starting using RuboCop is very straightforward and doesn’t depend on anyone else to setup it. You can install the gem and run it immediately during your workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;To install the RuboCop, it’s quick and easy. Let's consider here that all your Ruby environment is working, so just execute the following command to install the latest RuboCop version available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ gem install rubocop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;RuboCop officially supports the &lt;strong&gt;MRI 2.5+&lt;/strong&gt; and &lt;strong&gt;jRuby 9.2+&lt;/strong&gt; implementations. You can also install directly in the project using Bundler, adding the gem to your &lt;code&gt;Gemfile&lt;/code&gt;, and then run &lt;code&gt;bundle install&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;

&lt;p&gt;The RuboCop behavior can be controlled in the &lt;code&gt;.rubocop.yml&lt;/code&gt; file in the root path where you want to execute it. In this file, you can enable/disable certain cops (rules) or change their behavior.&lt;/p&gt;

&lt;p&gt;All cops are grouped into departments: &lt;strong&gt;Style&lt;/strong&gt;, &lt;strong&gt;Layout&lt;/strong&gt;, &lt;strong&gt;Lint&lt;/strong&gt;, &lt;strong&gt;Naming&lt;/strong&gt;, &lt;strong&gt;Security&lt;/strong&gt;, &lt;strong&gt;Metrics&lt;/strong&gt;, &lt;strong&gt;Migration&lt;/strong&gt;, &lt;strong&gt;Bundler,&lt;/strong&gt; and &lt;strong&gt;Gemspec&lt;/strong&gt;. You can read about the cops and their departments in the &lt;a href="https://docs.rubocop.org/rubocop/cops.html" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;. For reference purposes, check the configuration file that we use in &lt;a href="https://sourcelevel.io/" rel="noopener noreferrer"&gt;SourceLevel&lt;/a&gt; in our &lt;a href="https://github.com/sourcelevel/linters/blob/main/.rubocop.yml" rel="noopener noreferrer"&gt;linter’s configuration repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;.rubocop.yml&lt;/code&gt; file has the following structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;inherit_from: ../.rubocop.yml

require: rubocop-rails

Style/Encoding:
  Enabled: false

Layout/LineLength:
  Max: 99

...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note 1: We’re using &lt;code&gt;inherit_from&lt;/code&gt; to inherit all defined cops in the other file. See more in the &lt;a href="https://docs.rubocop.org/rubocop/configuration.html#inheritance" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;br&gt;
Note 2: If you’re using **Rails&lt;/em&gt;&lt;em&gt;, it’s important to require the &lt;code&gt;rubocop-rails&lt;/code&gt; extension (remember to add it to your &lt;code&gt;Gemfile&lt;/code&gt;), which will force RuboCop to follow the &lt;a href="https://rails.rubystyle.guide/" rel="noopener noreferrer"&gt;conventions and good practices&lt;/a&gt; defined by the Rails community.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;By default, when executed, the RuboCop looks for &lt;code&gt;.rubocop.yml&lt;/code&gt; in the current directory, then in your home path (&lt;code&gt;~/.rubocop.yml&lt;/code&gt;), and in the last case it will use the defaults. More details about RuboCop’s configuration file can be found on the &lt;a href="https://docs.rubocop.org/rubocop/configuration.html" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you want to create your configuration file, which I encourage, a good starting point is to use the &lt;a href="https://github.com/rubocop/rubocop/blob/master/.rubocop.yml" rel="noopener noreferrer"&gt;configuration&lt;/a&gt; available in the RuboCop repository as a reference. You can review cop by cop and configure what suits you. Just remember to check the cop availability for the version of RuboCop that you’re using.&lt;/p&gt;

&lt;p&gt;Keep in mind that style rules that belong to the &lt;code&gt;Style&lt;/code&gt; namespace are configurable and optional. A good recommendation is that these rules need to be discussed and defined with the entire team, not by a single person.&lt;/p&gt;

&lt;p&gt;It’s nice to mention that you can write your own cops, called &lt;strong&gt;Custom Cops&lt;/strong&gt;. With that, you can create your own rules, defining your practices to ensure that they will be followed. You can find more information about this process in &lt;a href="https://docs.rubocop.org/rubocop/development.html" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;To use the RuboCop you just need to navigate to the directory where you want to run the linter, and execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rubocop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can specify a file/path too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rubocop lib/file.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It’s possible to specify a list of directories and files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rubocop app/ spec/ lib/file.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running RuboCop, you’ll get an output with offenses, like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Offenses:

test.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
def badName
^
test.rb:1:5: C: Naming/MethodName: Use snake_case for method names.
def badName
    ^^^^^^^
test.rb:2:3: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression.
  if something
  ^^
test.rb:2:3: C: Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &amp;amp;&amp;amp;/||.
  if something
  ^^
test.rb:4:5: W: Layout/EndAlignment: end at 4, 4 is not aligned with if at 2, 2.
    end
    ^^^

1 file inspected, 5 offenses detected
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Autocorrecting
&lt;/h3&gt;

&lt;p&gt;A great thing about RuboCop is the autocorrecting feature. This option fix automatically all possible offenses in your code, based on defined rules. In our case, we use &lt;code&gt;-a&lt;/code&gt; that fix safe offenses, but you can be more optimistic and use &lt;code&gt;-A&lt;/code&gt; to fix all offenses (including unsafe), but you need to use it with caution.&lt;/p&gt;

&lt;p&gt;To use them, you just need to run RuboCop with this autocorrecting argument:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rubocop --auto-correct
# or
$ rubocop -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can check all &lt;strong&gt;RoboCop’s&lt;/strong&gt; arguments using the &lt;code&gt;--help&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;rubocop&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just for linking purposes, you can check the &lt;a href="https://docs.rubocop.org/rubocop/usage/auto_correct.html" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; to know more about autocorrect.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrating with other tools
&lt;/h2&gt;

&lt;p&gt;RuboCop integrates with many other tools. You may integrate it into your code editor to run it every time you save a file, and you'll immediately get its insights. &lt;/p&gt;

&lt;p&gt;For a list of currently supported code editors, you can check &lt;a href="https://docs.rubocop.org/rubocop/integration_with_other_tools.html#editor-integration" rel="noopener noreferrer"&gt;this page&lt;/a&gt; on documentation, and if your favorite is not listed, it’s a great opportunity to contribute to RuboCop implementing an integration.&lt;/p&gt;

&lt;p&gt;Another great usage is creating a &lt;a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks" rel="noopener noreferrer"&gt;Git Hook&lt;/a&gt; to run RuboCop before every commit. You can also setup RuboCop to be run into your Continuous Integration service (such as GitHub Actions) to have some insights for every commit. In all cases, more details can be found in the &lt;a href="https://docs.rubocop.org/rubocop/integration_with_other_tools.html#git-pre-commit-hook-integration-with-pre-commit" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope you enjoyed the content, and thank you for reading.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>linters</category>
      <category>rails</category>
      <category>rubocop</category>
    </item>
    <item>
      <title>Rubocop: Como instalar e configurar</title>
      <dc:creator>Gustavo Araujo</dc:creator>
      <pubDate>Sun, 09 Jan 2022 17:20:54 +0000</pubDate>
      <link>https://dev.to/garaujodev/rubocop-como-instalar-e-configurar-cg0</link>
      <guid>https://dev.to/garaujodev/rubocop-como-instalar-e-configurar-cg0</guid>
      <description>&lt;p&gt;Qualidade de código é importante, e toda equipe de alta performance sabe disso, mas você segue algum guia para padronizar sua base de código e garantir que todos estão indo e olhando pra mesma direção?&lt;/p&gt;

&lt;p&gt;Fazendo uma breve introdução, este é o objetivo de um linter: Uma ferramenta para analisar seu código-fonte e identificar erros de programação, bugs e inconsistências &lt;em&gt;(&lt;a href="https://en.wikipedia.org/wiki/Lint_(software)" rel="noopener noreferrer"&gt;Wikipedia&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;O objetivo principal é garantir que seu código siga as mesmas regras e práticas, para parecer que todo o código foi escrito pela mesma pessoa.&lt;/p&gt;

&lt;p&gt;Em uma grande variedade de linters de Ruby, temos o &lt;strong&gt;&lt;a href="https://github.com/rubocop/rubocop/" rel="noopener noreferrer"&gt;RuboCop&lt;/a&gt;&lt;/strong&gt; (disponível como uma gem) que segue as boas práticas descritas no &lt;a href="https://rubystyle.guide/" rel="noopener noreferrer"&gt;The Ruby Style Guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Uma das vantagens de usar um linter, é salvar tempo revisando código, pois ele previne pequenos problemas como inconsistências em nomes de variáveis e práticas durante o processo de desenvolvimento. Com isso, a revisão de código é mais eficiente, e pode ser focada nas implementações e requisitos de funcionalidades.&lt;/p&gt;

&lt;p&gt;Começar a usar o Rubocop é bastante simples e não depende de ninguém mais para configura-lo. Você pode instalar a gem e roda-la instantaneamente no seu fluxo de trabalho.&lt;/p&gt;

&lt;h2&gt;
  
  
  Instalação
&lt;/h2&gt;

&lt;p&gt;Para instalar o &lt;strong&gt;Rubocop&lt;/strong&gt;, é bem rápido e simples. Vamos considerar aqui que todo o seu setup Ruby esteja funcional, então execute o seguinte comando para instalar a última versão disponível:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ gem install rubocop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;RuboCop oficialmente suporta as implementações &lt;/em&gt;&lt;em&gt;MRI 2.5+&lt;/em&gt;&lt;em&gt; e &lt;/em&gt;&lt;em&gt;jRuby 9.2+&lt;/em&gt;&lt;em&gt;. Você também pode instala-lo diretamente no seu projeto usando o Bundler, adicionando a gem ao seu arquivo &lt;code&gt;Gemfile&lt;/code&gt;, e rodando &lt;code&gt;bundle install&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuração
&lt;/h2&gt;

&lt;p&gt;O comportamento do &lt;strong&gt;Rubocop&lt;/strong&gt; pode ser controlado pelo arquivo &lt;code&gt;.rubocop.yml&lt;/code&gt; na raiz do projeto onde você deseja executá-lo. É nesse arquivo que você consegue habilitar/desabilitar certas cops (regras) ou alterar seu comportamento.&lt;/p&gt;

&lt;p&gt;Todas as cops são agrupadas em departamentos: &lt;strong&gt;Style&lt;/strong&gt;, &lt;strong&gt;Layout&lt;/strong&gt;, &lt;strong&gt;Lint&lt;/strong&gt;, &lt;strong&gt;Naming&lt;/strong&gt;, &lt;strong&gt;Security&lt;/strong&gt;, &lt;strong&gt;Metrics&lt;/strong&gt;, &lt;strong&gt;Migration&lt;/strong&gt;, &lt;strong&gt;Bundler,&lt;/strong&gt; e &lt;strong&gt;Gemspec&lt;/strong&gt;. Você pode ler melhores sobre as cops e seus agrupamentos na &lt;a href="https://docs.rubocop.org/rubocop/cops.html" rel="noopener noreferrer"&gt;documentação&lt;/a&gt;. Por propósitos de referência, você pode consultar o arquivo que usamos na &lt;a href="https://sourcelevel.io/" rel="noopener noreferrer"&gt;SourceLevel&lt;/a&gt; em nosso &lt;a href="https://github.com/sourcelevel/linters/blob/main/.rubocop.yml" rel="noopener noreferrer"&gt;repositório&lt;/a&gt; de configuração de linters.&lt;/p&gt;

&lt;p&gt;O arquivo &lt;code&gt;.rubocop.yml&lt;/code&gt; tem a seguinte estrutura:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;inherit_from: ../.rubocop.yml

require: rubocop-rails

Style/Encoding:
  Enabled: false

Layout/LineLength:
  Max: 99
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Nota 1: Usamos o &lt;code&gt;inherit_from&lt;/code&gt; para usar as cops já definidas de um outro arquivo. Mais detalhes na &lt;a href="https://docs.rubocop.org/rubocop/configuration.html#inheritance" rel="noopener noreferrer"&gt;documentação&lt;/a&gt;.&lt;br&gt;
Nota 2:&lt;/em&gt; Se você usa &lt;strong&gt;Rails&lt;/strong&gt;&lt;em&gt;, é importante fazer o require da extensão &lt;code&gt;rubocop-rails&lt;/code&gt; (Lembre-se de adiciona-la em seu arquivo&lt;code&gt;Gemfile&lt;/code&gt;), que vai forçar o RuboCop a seguir as &lt;a href="https://rails.rubystyle.guide/" rel="noopener noreferrer"&gt;convenções e boas práticas&lt;/a&gt; definidas pela comunidade Rails.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Por padrão quando executado, o RuboCop procura por um arquivo&lt;code&gt;.rubocop.yml&lt;/code&gt; no diretório atual, logo depois em seu home path (&lt;code&gt;~/.rubocop.yml&lt;/code&gt;), e em último caso vai usar as configurações padrões. Mais detalhes sobre a configuração do Rubocop podem ser encontradas na &lt;a href="https://docs.rubocop.org/rubocop/configuration.html" rel="noopener noreferrer"&gt;documentação oficial&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Se você deseja criar seu próprio arquivo de configuração, o que é recomendável, um bom ponto de partida é usar o &lt;a href="https://github.com/rubocop/rubocop/blob/master/.rubocop.yml" rel="noopener noreferrer"&gt;arquivo&lt;/a&gt; disponível no repositório do Rubocop como referência. Você pode revisar regra por regra e configurar o que melhor funciona para você. Apenas lembre-se de verificar a disponibilidade da regra para a versão do RuboCop que você esteja usando.&lt;/p&gt;

&lt;p&gt;Mantenha em mente que as regras pertencentes ao agrupamento &lt;code&gt;Style&lt;/code&gt; são configuráveis e opcionais. Uma boa recomendação é que essas regras sejam discutidas e definidas com toda a equipe, e não somente por uma pessoa.&lt;/p&gt;

&lt;p&gt;É bom mencionar que você pode escrever suas próprias cops, chamadas &lt;strong&gt;Custom Cops&lt;/strong&gt;. Com elas, você pode definir suas próprias regras e práticas para garantir que elas serão seguidas. Você pode encontrar mais informações sobre como criar uma Custom Cop na &lt;a href="https://docs.rubocop.org/rubocop/development.html" rel="noopener noreferrer"&gt;documentação&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Uso
&lt;/h2&gt;

&lt;p&gt;Para usar o RuboCop você só precisa navegar até o diretório onde deseja rodar o linter e executar:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rubocop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Você pode especificar um arquivo/diretório:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rubocop lib/file.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Também é possível especificar uma lista de arquivos e diretórios:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rubocop app/ spec/ lib/file.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Após rodar o RuboCop, você deve obter uma saída com as possíveis ofensas, algo como:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Offenses:

test.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
def badName
^
test.rb:1:5: C: Naming/MethodName: Use snake_case for method names.
def badName
    ^^^^^^^
test.rb:2:3: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression.
  if something
  ^^
test.rb:2:3: C: Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &amp;amp;&amp;amp;/||.
  if something
  ^^
test.rb:4:5: W: Layout/EndAlignment: end at 4, 4 is not aligned with if at 2, 2.
    end
    ^^^

1 file inspected, 5 offenses detected
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Autocorreção
&lt;/h3&gt;

&lt;p&gt;Uma ótima funcionalidade do RuboCop é a autocorreção. Essa opção corrige automaticamente todas as possíveis ofensas no seu código, baseando-se nas regras definidas. Em nosso caso, usamos o argumento &lt;code&gt;-a&lt;/code&gt; para corrigir as ofensas consideradas seguras de serem corrigidas, mas você pode ser mais otimistas e usar o argumento&lt;code&gt;-A&lt;/code&gt; para corrigir todas as ofensas possíveis (incluindo as que talvez a correção não seja tão segura), mas você precisa usa-lo com cautela.&lt;/p&gt;

&lt;p&gt;Para usa-la você precisa rodar o RuboCop com o argumento de autocorreção:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rubocop --auto-correct
# ou
$ rubocop -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Você pode verificar todos os argumentos aceitos pelo &lt;strong&gt;RuboCop&lt;/strong&gt; usando &lt;code&gt;--help&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rubocop --help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apenas para propósitos de lincagem, você pode checar a &lt;a href="https://docs.rubocop.org/rubocop/usage/auto_correct.html" rel="noopener noreferrer"&gt;documentação&lt;/a&gt; para saber mais a respeito da funcionalidade de autocorreção.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrando com outras ferramentas
&lt;/h2&gt;

&lt;p&gt;O RuboCop Integra-se com muitas outras ferramentas. Você pode integra-lo no seu editor de código para roda-lo toda vez que você salvar um arquivo, e assim obter uma resposta imediata&lt;/p&gt;

&lt;p&gt;Para uma lista de editores de códigos suportados, você pode verificar &lt;a href="https://docs.rubocop.org/rubocop/integration_with_other_tools.html#editor-integration" rel="noopener noreferrer"&gt;esta página&lt;/a&gt; na documentação, e caso o seu favorito não esteja listado, é uma ótima oportunidade para contribuir com o RuboCop implementando uma integração.&lt;/p&gt;

&lt;p&gt;Outra ótima integração é criar um &lt;a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks" rel="noopener noreferrer"&gt;Git Hook&lt;/a&gt; para rodar o RuboCop após cada commit. Você também pode configurar o RuboCop para ser executado em seu serviço de Integração Continua (CI), como GitHub Actions, para ter insights após cada interação com um Pull Request. Em todos os casos, você pode encontrar mais detalhes na &lt;a href="https://docs.rubocop.org/rubocop/integration_with_other_tools.html#git-pre-commit-hook-integration-with-pre-commit" rel="noopener noreferrer"&gt;documentação&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Você tem algum caso de uso legal para compartilhar? Sinta-se a vontade para me contatar via &lt;a href="https://twitter.com/garaujodev" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; ou use a sessão de comentários abaixo.&lt;/p&gt;

&lt;p&gt;Espero que você tenha gostado do conteúdo, e obrigado por ler.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rubocop</category>
      <category>rails</category>
      <category>linters</category>
    </item>
    <item>
      <title>GitHub CLI: PRs, Issues e outros conceitos do GitHub direto no terminal</title>
      <dc:creator>Gustavo Araujo</dc:creator>
      <pubDate>Sun, 10 Jan 2021 05:14:23 +0000</pubDate>
      <link>https://dev.to/garaujodev/github-cli-prs-issues-e-outros-conceitos-do-github-direto-no-terminal-176k</link>
      <guid>https://dev.to/garaujodev/github-cli-prs-issues-e-outros-conceitos-do-github-direto-no-terminal-176k</guid>
      <description>&lt;h3&gt;
  
  
  O que é?
&lt;/h3&gt;

&lt;p&gt;GitHub CLI  (&lt;em&gt;Command Line Interface&lt;/em&gt;), como o próprio nome sugere, é o GitHub via linha de comando. Com essa ferramenta é possível trazer &lt;em&gt;pull requests&lt;/em&gt;, &lt;em&gt;issues&lt;/em&gt; e outros conceitos do GitHub para dentro do terminal.&lt;/p&gt;

&lt;p&gt;Como sugere o &lt;a href="https://github.com/cli/cli" rel="noopener noreferrer"&gt;repositório oficial&lt;/a&gt;, a CLI do GitHub está disponível para repositórios hospedados em &lt;a href="http://github.com/" rel="noopener noreferrer"&gt;GitHub.com&lt;/a&gt; e GitHub Enterprise Server 2.20+, e pode ser instalado em MacOS, Windows e Linux.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vale a penar usar?
&lt;/h3&gt;

&lt;p&gt;É uma pergunta bastante relativa, que pode ser respondida levantando dois pontos:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Você é um amante do Terminal?&lt;/li&gt;
&lt;li&gt;Você já usa o &lt;code&gt;git&lt;/code&gt; via CLI?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Se a resposta para ambos for sim, talvez vale a pena dar uma olhada mais a fundo.&lt;/p&gt;

&lt;p&gt;Com a ferramenta, você consegue abrir um &lt;em&gt;Pull Request&lt;/em&gt; pelo mesmo terminal que faz seus &lt;em&gt;commits&lt;/em&gt;, o que nos poupa bastante tempo, simples e rápido.&lt;/p&gt;

&lt;h3&gt;
  
  
  Como instalar
&lt;/h3&gt;

&lt;p&gt;Como não é bem o foco aqui, vou deixar a recomendação de consultar a &lt;a href="https://github.com/cli/cli#installation" rel="noopener noreferrer"&gt;própria documentação&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Após instalar, execute o seguinte comando para testar o funcionamento e já verificar todos os comandos:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Lembrando que, &lt;code&gt;gh&lt;/code&gt; é o próprio binário, não se trata de um &lt;em&gt;alias&lt;/em&gt; 🙂.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Passos iniciais
&lt;/h3&gt;

&lt;p&gt;O primeiro passo após instalar é autenticar com sua conta do GitHub, para isso basta executar o comando:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh auth login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Existem duas formas de login:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Via token, que pode ser gerado no GitHub&lt;/li&gt;
&lt;li&gt;Login no navegador&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Por questões de praticidade, recomendo a segunda opção. Após autenticado, você pode verificar o status com o comando:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh auth status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Feito isso, caso queira você já pode configurar o seu editor de texto favorito para editar as mensagens de &lt;em&gt;Pull Requests:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh config &lt;span class="nb"&gt;set &lt;/span&gt;editor &amp;lt;editor&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lembrando que, caso não seja atribuído nenhum editor utilizando o comando acima, o &lt;code&gt;gh&lt;/code&gt; assumirá o padrão definido na variável de ambiente &lt;code&gt;$EDITOR&lt;/code&gt; (No MacOS e no Linux o editor padrão é o &lt;code&gt;Nano&lt;/code&gt;, no Windows &lt;code&gt;Notepad&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Mais detalhes sobre o comando &lt;code&gt;gh config&lt;/code&gt; podem ser encontrados na &lt;a href="https://cli.github.com/manual/gh_config" rel="noopener noreferrer"&gt;documentação oficial&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hands-on - O que é possível fazer?
&lt;/h2&gt;

&lt;p&gt;Abaixo temos algumas das coisas interessantes que essa ferramenta nos permite fazer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pull Requests
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Abrir um &lt;em&gt;Pull Request&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;create
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;a href="https://media2.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%2Fqs4u1memok0irr0zhjre.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fqs4u1memok0irr0zhjre.gif" alt="GIF exemplificando o uso do comando" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Algum dos parâmetros interessantes que temos aqui:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Com o parâmetro &lt;code&gt;-B&lt;/code&gt; podemos especificar o base branch, isto é, para qual branch essas alterações serão enviadas após o merge:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;create &lt;span class="nt"&gt;-B&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;



&lt;ul&gt;
&lt;li&gt;Com o parâmetro &lt;code&gt;-d&lt;/code&gt; podemos especificar que se trata de um &lt;em&gt;&lt;a href="https://docs.github.com/pt/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/about-pull-requests#pull-requests-de-rascunho" rel="noopener noreferrer"&gt;Draft Pull Request&lt;/a&gt;:&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;create &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Fechar/reabrir um &lt;em&gt;Pull Request:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;close/reopen
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Mergear um &lt;em&gt;Pull Request:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;merge
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Listar &lt;em&gt;Pull Requests:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;list
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Ver o &lt;em&gt;diff&lt;/em&gt; de um &lt;em&gt;Pull Request:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;diff
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Revisar um &lt;em&gt;Pull Request&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;review
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Verificar os &lt;em&gt;status checks&lt;/em&gt; de um &lt;em&gt;Pull Request&lt;/em&gt; aberto, como o &lt;em&gt;CI&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;checks
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Verificar seu status de &lt;em&gt;Pull Requests:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;status
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;&lt;a href="https://media2.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%2Fqccomnirzu3bcscipfqx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fqccomnirzu3bcscipfqx.gif" alt="GIF exemplificando o uso do comando" width="1468" height="664"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Issues
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Criar uma &lt;em&gt;Issue:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh issue create
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;a href="https://media2.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%2Fayhebol9ev6lolpp2z02.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fayhebol9ev6lolpp2z02.gif" alt="GIF exemplificando o uso do comando" width="1757" height="664"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Fechar/reabrir uma &lt;em&gt;Issue:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh issue close/reopen
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Listar &lt;em&gt;Issues:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh issue list
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ver uma &lt;em&gt;Issue:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh issue view
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verificar seu status de &lt;em&gt;Issues:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;gh issue status
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;a href="https://media2.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%2Fdasqo21df2p4orury16d.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fdasqo21df2p4orury16d.gif" alt="GIF exemplificando o uso do comando" width="1757" height="664"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Considerações finais
&lt;/h3&gt;

&lt;p&gt;Com certeza é uma ferramenta sensacional, que, se bem usada nos poupa bastante tempo. &lt;strong&gt;E você, o que achou? Já usa a ferramenta? Me conta nos comentários&lt;/strong&gt; 🙂.&lt;/p&gt;

&lt;p&gt;Caso tenham dúvidas, sintam-se a vontade para me contatar via &lt;a href="http://twitter.com/garaujodev" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; 😉&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>terminal</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
