1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
<!DOCTYPE html>
<html>
<head>
<title>GCLI Tutorial | First Steps</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link rel="prev" href="01-Installation.html" />
<link rel="next" href="{{NEXTURL}}" />
<!-- Shamelessly stolen from: http://bettermotherfuckingwebsite.com/ -->
<style>
body {
margin:5% auto;
background: #f2f2f2;
color: #444444;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 1.8;
text-shadow: 0 1px 0 #ffffff; max-width: 73%;
}
pre {
line-height: 1.0;
}
a {
border-bottom: 1px solid #444444;
color: #444444;
text-decoration: none;
}
a:hover {
border-bottom: 0;
}
</style>
</head>
<body>
<nav style=text-align:right>
<a href="01-Installation.html" title="Installation">⇐ Previous</a>
<a href="index.html">Table of contents</a>
<a href="03-Find-Documentation.html" title="How to find documentation">Next ⇒</a>
</nav>
<hr />
<h1>First steps</h1>
<h2>Listing issues</h2>
<p>Let's start off by listing some issues - here for the curl project
which is hosted on GitHub under curl/curl. To list issues for it one
would run:</p>
<pre><code>$ gcli -t github issues -o curl -r curl
</code></pre>
<p>You will see the list of the 30 most recent open issue tickets. The
command above does the following:</p>
<ul>
<li>invoke gcli</li>
<li>as a global option we switch it into Github-Mode</li>
<li>invoke the issues subcommand</li>
<li>operate on the repository owner curl (<code>-o curl</code>)</li>
<li>operate on the repository curl (<code>-r curl</code>)</li>
</ul>
<p>Note that the <code>-t github</code> option goes before the issues subcommand
because it is a global option for gcli that affects how all the
following things like subcommands operate.</p>
<p>However, now I also want to see closed issues:</p>
<pre><code>$ gcli -t github issues -o curl -r curl -a
</code></pre>
<p>The <code>-a</code> option will disregard the status of the issue.</p>
<p>Oh and the screen is a bit cluttered by all these tickets - let's only
fetch the first 10 issues:</p>
<pre><code>$ gcli -t github issues -o curl -r curl -n10
</code></pre>
<h2>Examining issues</h2>
<p>As of now we only produced lists of issues. However, we may also want
to look at the details of an issue such as:</p>
<ul>
<li>the original post</li>
<li>labels</li>
<li>comments</li>
<li>assignees of the issue (that is someone who is working on the bug)</li>
</ul>
<p>Let's get a good summary of issue <code>#11268</code> in the curl project:</p>
<pre><code>$ gcli -t github issues -o curl -r curl -i 11268 all
</code></pre>
<p>As you can see most of the options are the same, however now we tell
gcli with the <code>-i 11268</code> option that we want to work with a single
issue. Then we tell gcli what actions to perform on the issue. Another
important action is <code>comments</code>. Guess what it does:</p>
<pre><code>$ gcli -t github issues -o curl -r curl -i 11268 comments
</code></pre>
<p>I know a person that likes to post long verbose traces. Let's search
for an issue authored by them on the OpenSSL GitHub page:</p>
<pre><code>$ gcli -t github issues -o openssl -r openssl -A blastwave -a
NUMBER STATE TITLE
20379 open test "80-test_ssl_new.t" fails on Solaris 10 SPARCv9
10547 open Strict C90 CFLAGS results in sha.h:91 ISO C90 does not support long long
8048 closed OPENSSL_strnlen SIGSEGV in o_str.c line 76
$
</code></pre>
<p>The <code>-A</code> option lets you filter for specific authors.</p>
<p>Let's look at the issue state of <code>#10547</code>:</p>
<pre><code>$ gcli -t github issues -o openssl -r openssl -i 10547 status
NAME : 10547
TITLE : Strict C90 CFLAGS results in sha.h:91 ISO C90 does not support long long
CREATED : 2019-12-01T04:35:23Z
AUTHOR : blastwave
STATE : open
COMMENTS : 9
LOCKED : no
LABELS : triaged: bug
ASSIGNEES : none
$
</code></pre>
<p>That's nine comments - let's read the original post and the comments
in our favourite pager <code>less</code>:</p>
<pre><code>$ gcli -t github issues -o openssl -r openssl -i 10547 op comments | less
</code></pre>
<p>As you can see gcli will accept multiple actions for an issue and
executes them sequentially.</p>
<br />
<hr />
<nav style=text-align:right>
<a href="01-Installation.html" title="Installation">⇐ Previous</a>
<a href="index.html">Table of contents</a>
<a href="03-Find-Documentation.html" title="How to find documentation">Next ⇒</a>
</nav>
</body>
</html>
|