docs/Build.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Class: Build
— Documentation by YARD 0.9.19
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "Build";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index (B)</a> »
<span class="title">Build</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Class: Build
</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd>
<span class="inheritName">Object</span>
<ul class="fullTree">
<li>Object</li>
<li class="next">Build</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/build.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>Top level class that loads the list of potential builds from github</p>
</div>
</div>
<div class="tags">
</div>
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#client-instance_method" title="#client (instance method)">#<strong>client</strong> ⇒ Object </a>
</span>
<span class="note title readonly">readonly</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute client.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#potential_builds-instance_method" title="#potential_builds (instance method)">#<strong>potential_builds</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute potential_builds.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#pull_request_details-instance_method" title="#pull_request_details (instance method)">#<strong>pull_request_details</strong> ⇒ Object </a>
</span>
<span class="note title readonly">readonly</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute pull_request_details.</p>
</div></span>
</li>
</ul>
<h2>
Instance Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#get_regression_base-instance_method" title="#get_regression_base (instance method)">#<strong>get_regression_base</strong>(t_potential_build) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(token, repository, max_age) ⇒ Build </a>
</span>
<span class="note title constructor">constructor</span>
<span class="summary_desc"><div class='inline'>
<p>A new instance of Build.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#needs_daily_task-instance_method" title="#needs_daily_task (instance method)">#<strong>needs_daily_task</strong>(results_repo, results_path) ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#query_branches-instance_method" title="#query_branches (instance method)">#<strong>query_branches</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#query_pull_requests-instance_method" title="#query_pull_requests (instance method)">#<strong>query_pull_requests</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>note, only builds 'external' pull_requests.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#results_repositories-instance_method" title="#results_repositories (instance method)">#<strong>results_repositories</strong> ⇒ Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<div class="method_details first">
<h3 class="signature first" id="initialize-instance_method">
#<strong>initialize</strong>(token, repository, max_age) ⇒ <tt><span class='object_link'><a href="" title="Build (class)">Build</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a new instance of Build</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
26
27
28
29
30
31
32
33
34
35</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/build.rb', line 26</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_token'>token</span><span class='comma'>,</span> <span class='id identifier rubyid_repository'>repository</span><span class='comma'>,</span> <span class='id identifier rubyid_max_age'>max_age</span><span class='rparen'>)</span>
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='const'>Octokit</span><span class='op'>::</span><span class='const'>Client</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:access_token</span> <span class='op'>=></span> <span class='id identifier rubyid_token'>token</span><span class='rparen'>)</span>
<span class='ivar'>@token</span> <span class='op'>=</span> <span class='id identifier rubyid_token'>token</span>
<span class='ivar'>@repository</span> <span class='op'>=</span> <span class='id identifier rubyid_repository'>repository</span>
<span class='ivar'>@user</span> <span class='op'>=</span> <span class='id identifier rubyid_github_query'><span class='object_link'><a href="top-level-namespace.html#github_query-instance_method" title="#github_query (method)">github_query</a></span></span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span> <span class='rbrace'>}</span>
<span class='id identifier rubyid_github_query'><span class='object_link'><a href="top-level-namespace.html#github_query-instance_method" title="#github_query (method)">github_query</a></span></span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='ivar'>@user</span><span class='period'>.</span><span class='id identifier rubyid_login'>login</span> <span class='rbrace'>}</span>
<span class='ivar'>@potential_builds</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='ivar'>@max_age</span> <span class='op'>=</span> <span class='id identifier rubyid_max_age'>max_age</span>
<span class='id identifier rubyid_github_check_rate_limit'><span class='object_link'><a href="top-level-namespace.html#github_check_rate_limit-instance_method" title="#github_check_rate_limit (method)">github_check_rate_limit</a></span></span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_last_response'>last_response</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_attr_details" class="attr_details">
<h2>Instance Attribute Details</h2>
<span id=""></span>
<div class="method_details first">
<h3 class="signature first" id="client-instance_method">
#<strong>client</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute client</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
23
24
25</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/build.rb', line 23</span>
<span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
<span class='ivar'>@client</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="potential_builds=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="potential_builds-instance_method">
#<strong>potential_builds</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute potential_builds</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
24
25
26</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/build.rb', line 24</span>
<span class='kw'>def</span> <span class='id identifier rubyid_potential_builds'>potential_builds</span>
<span class='ivar'>@potential_builds</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id=""></span>
<div class="method_details ">
<h3 class="signature " id="pull_request_details-instance_method">
#<strong>pull_request_details</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute pull_request_details</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
23
24
25</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/build.rb', line 23</span>
<span class='kw'>def</span> <span class='id identifier rubyid_pull_request_details'>pull_request_details</span>
<span class='ivar'>@pull_request_details</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="get_regression_base-instance_method">
#<strong>get_regression_base</strong>(t_potential_build) ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/build.rb', line 145</span>
<span class='kw'>def</span> <span class='id identifier rubyid_get_regression_base'>get_regression_base</span><span class='lparen'>(</span><span class='id identifier rubyid_t_potential_build'>t_potential_build</span><span class='rparen'>)</span>
<span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='id identifier rubyid_t_potential_build'>t_potential_build</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span>
<span class='id identifier rubyid_defined_baseline'>defined_baseline</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>regression_baseline_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_t_potential_build'>t_potential_build</span><span class='period'>.</span><span class='id identifier rubyid_branch_name'>branch_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_default_baseline'>default_baseline</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_regression_baseline_default'>regression_baseline_default</span>
<span class='id identifier rubyid_default_baseline'>default_baseline</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>develop</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_default_baseline'>default_baseline</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_t_potential_build'>t_potential_build</span><span class='period'>.</span><span class='id identifier rubyid_branch_name'>branch_name</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>develop</span><span class='tstring_end'>'</span></span> <span class='op'>&&</span> <span class='id identifier rubyid_t_potential_build'>t_potential_build</span><span class='period'>.</span><span class='id identifier rubyid_branch_name'>branch_name</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>master</span><span class='tstring_end'>'</span></span>
<span class='id identifier rubyid_baseline'>baseline</span> <span class='op'>=</span> <span class='id identifier rubyid_defined_baseline'>defined_baseline</span> <span class='op'>||</span> <span class='id identifier rubyid_default_baseline'>default_baseline</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Baseline defined as: '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_baseline'>baseline</span><span class='embexpr_end'>}</span><span class='tstring_content'>' for branch '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_t_potential_build'>t_potential_build</span><span class='period'>.</span><span class='id identifier rubyid_branch_name'>branch_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>'</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_baseline'>baseline</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='lbracket'>[</span><span class='id identifier rubyid_t_potential_build'>t_potential_build</span><span class='period'>.</span><span class='id identifier rubyid_branch_name'>branch_name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_baseline'>baseline</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Baseline refined to: '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_baseline'>baseline</span><span class='embexpr_end'>}</span><span class='tstring_content'>' for branch '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_t_potential_build'>t_potential_build</span><span class='period'>.</span><span class='id identifier rubyid_branch_name'>branch_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>'</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_baseline'>baseline</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_baseline'>baseline</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
<span class='ivar'>@potential_builds</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span>
<span class='comment'># TODO: Protect other fork develop branches from inadvertently becoming the baseline branch
</span> <span class='kw'>return</span> <span class='id identifier rubyid_p'>p</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_branch_name'>branch_name</span> <span class='op'>==</span> <span class='id identifier rubyid_baseline'>baseline</span>
<span class='kw'>end</span>
<span class='kw'>nil</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="needs_daily_task-instance_method">
#<strong>needs_daily_task</strong>(results_repo, results_path) ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/build.rb', line 170</span>
<span class='kw'>def</span> <span class='id identifier rubyid_needs_daily_task'>needs_daily_task</span><span class='lparen'>(</span><span class='id identifier rubyid_results_repo'>results_repo</span><span class='comma'>,</span> <span class='id identifier rubyid_results_path'>results_path</span><span class='rparen'>)</span>
<span class='id identifier rubyid_dateprefix'>dateprefix</span> <span class='op'>=</span> <span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='period'>.</span><span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%F</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_document'>document</span> <span class='op'>=</span>
<span class='heredoc_beg'><<-HEADER</span>
<span class='tstring_content'>---
title: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dateprefix'>dateprefix</span><span class='embexpr_end'>}</span><span class='tstring_content'> Daily Task
tags: daily_task
date: </span><span class='embexpr_beg'>#{</span><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='period'>.</span><span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>
repository: </span><span class='embexpr_beg'>#{</span><span class='ivar'>@repository</span><span class='embexpr_end'>}</span><span class='tstring_content'>
machine_name: </span><span class='embexpr_beg'>#{</span><span class='const'>Socket</span><span class='period'>.</span><span class='id identifier rubyid_gethostname'>gethostname</span><span class='embexpr_end'>}</span><span class='tstring_content'>
machine_ip: </span><span class='embexpr_beg'>#{</span><span class='const'>Socket</span><span class='period'>.</span><span class='id identifier rubyid_ip_address_list'>ip_address_list</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_ai'>ai</span><span class='op'>|</span> <span class='id identifier rubyid_ai'>ai</span><span class='period'>.</span><span class='id identifier rubyid_ipv4?'>ipv4?</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_ai'>ai</span><span class='period'>.</span><span class='id identifier rubyid_ipv4_loopback?'>ipv4_loopback?</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_ip_address'>ip_address</span><span class='embexpr_end'>}</span><span class='tstring_content'>
---
</span><span class='heredoc_end'> HEADER
</span>
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='id identifier rubyid_github_query'><span class='object_link'><a href="top-level-namespace.html#github_query-instance_method" title="#github_query (method)">github_query</a></span></span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span> <span class='kw'>do</span>
<span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_create_contents'>create_contents</span><span class='lparen'>(</span>
<span class='id identifier rubyid_results_repo'>results_repo</span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_results_path'>results_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dateprefix'>dateprefix</span><span class='embexpr_end'>}</span><span class='tstring_content'>-DailyTaskRun</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Commit daily task run file: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dateprefix'>dateprefix</span><span class='embexpr_end'>}</span><span class='tstring_content'>-DailyTaskRun</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
<span class='id identifier rubyid_document'>document</span>
<span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Daily task document sha: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_sha'>sha</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>true</span>
<span class='kw'>rescue</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Daily task file not created, skipping daily task</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
<span class='kw'>false</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="query_branches-instance_method">
#<strong>query_branches</strong> ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/build.rb', line 37</span>
<span class='kw'>def</span> <span class='id identifier rubyid_query_branches'>query_branches</span> <span class='comment'># TODO: properly handle paginated results from github
</span>
<span class='id identifier rubyid_branches'>branches</span> <span class='op'>=</span> <span class='id identifier rubyid_github_query'><span class='object_link'><a href="top-level-namespace.html#github_query-instance_method" title="#github_query (method)">github_query</a></span></span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_branches'>branches</span><span class='lparen'>(</span><span class='ivar'>@repository</span><span class='comma'>,</span> <span class='symbol'>:per_page</span> <span class='op'>=></span> <span class='int'>100</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='id identifier rubyid_branches'>branches</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_b'>b</span><span class='op'>|</span>
<span class='kw'>if</span> <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>#</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Skipping branch that starts with hash symbol: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>next</span>
<span class='kw'>end</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Querying potential build: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_branch_details'>branch_details</span> <span class='op'>=</span> <span class='id identifier rubyid_github_query'><span class='object_link'><a href="top-level-namespace.html#github_query-instance_method" title="#github_query (method)">github_query</a></span></span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_branch'>branch</span><span class='lparen'>(</span><span class='ivar'>@repository</span><span class='comma'>,</span> <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='id identifier rubyid_skip_message_present'>skip_message_present</span> <span class='op'>=</span> <span class='kw'>false</span>
<span class='kw'>begin</span>
<span class='id identifier rubyid_skip_message_present'>skip_message_present</span> <span class='op'>=</span> <span class='id identifier rubyid_branch_details'>branch_details</span><span class='period'>.</span><span class='id identifier rubyid_commit'>commit</span><span class='period'>.</span><span class='id identifier rubyid_commit'>commit</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>[decent_ci_skip]</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
<span class='kw'>rescue</span> <span class='comment'># Ignored
</span>
<span class='kw'>end</span>
<span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_skip_message_present'>skip_message_present</span> <span class='op'>&&</span> <span class='id identifier rubyid_branch_details'>branch_details</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>develop</span><span class='tstring_end'>'</span></span> <span class='comment'># only skip if we have the msg on a non-develop branch
</span>
<span class='kw'>begin</span>
<span class='id identifier rubyid_days'>days</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span> <span class='op'>-</span> <span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_branch_details'>branch_details</span><span class='period'>.</span><span class='id identifier rubyid_commit'>commit</span><span class='period'>.</span><span class='id identifier rubyid_commit'>commit</span><span class='period'>.</span><span class='id identifier rubyid_author'>author</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span>
<span class='kw'>if</span> <span class='id identifier rubyid_days'>days</span> <span class='op'><=</span> <span class='ivar'>@max_age</span>
<span class='id identifier rubyid_login'>login</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Unknown</span><span class='tstring_end'>'</span></span>
<span class='kw'>if</span> <span class='id identifier rubyid_branch_details'>branch_details</span><span class='period'>.</span><span class='id identifier rubyid_commit'>commit</span><span class='period'>.</span><span class='id identifier rubyid_author'>author</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Commit author is nil, getting login details from committer information</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_login'>login</span> <span class='op'>=</span> <span class='id identifier rubyid_branch_details'>branch_details</span><span class='period'>.</span><span class='id identifier rubyid_commit'>commit</span><span class='period'>.</span><span class='id identifier rubyid_committer'>committer</span><span class='period'>.</span><span class='id identifier rubyid_login'>login</span> <span class='kw'>unless</span> <span class='id identifier rubyid_branch_details'>branch_details</span><span class='period'>.</span><span class='id identifier rubyid_commit'>commit</span><span class='period'>.</span><span class='id identifier rubyid_committer'>committer</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Login set to </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_login'>login</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_login'>login</span> <span class='op'>=</span> <span class='id identifier rubyid_branch_details'>branch_details</span><span class='period'>.</span><span class='id identifier rubyid_commit'>commit</span><span class='period'>.</span><span class='id identifier rubyid_author'>author</span><span class='period'>.</span><span class='id identifier rubyid_login'>login</span>
<span class='kw'>end</span>
<span class='ivar'>@potential_builds</span> <span class='op'><<</span> <span class='const'><span class='object_link'><a href="PotentialBuild.html" title="PotentialBuild (class)">PotentialBuild</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="PotentialBuild.html#initialize-instance_method" title="PotentialBuild#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='comma'>,</span> <span class='ivar'>@token</span><span class='comma'>,</span> <span class='ivar'>@repository</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_commit'>commit</span><span class='period'>.</span><span class='id identifier rubyid_sha'>sha</span><span class='comma'>,</span> <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_login'>login</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Found a branch to add to potential_builds: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>else</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Skipping potential build (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>), it hasn't been updated in </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_days'>days</span><span class='embexpr_end'>}</span><span class='tstring_content'> days</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="DecentCIKnownError.html" title="DecentCIKnownError (class)">DecentCIKnownError</a></span></span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Skipping potential branch (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>): </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Skipping potential branch (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>): </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_backtrace'>backtrace</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="query_pull_requests-instance_method">
#<strong>query_pull_requests</strong> ⇒ <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>note, only builds 'external' pull_requests. Internal ones would have already been built as a branch</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/build.rb', line 84</span>
<span class='kw'>def</span> <span class='id identifier rubyid_query_pull_requests'>query_pull_requests</span> <span class='comment'># This line is where we want to add :accept => 'application/vnd.github.shadow-cat-preview+json' for draft PRs
</span>
<span class='id identifier rubyid_pull_requests'>pull_requests</span> <span class='op'>=</span> <span class='id identifier rubyid_github_query'><span class='object_link'><a href="top-level-namespace.html#github_query-instance_method" title="#github_query (method)">github_query</a></span></span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_pull_requests'>pull_requests</span><span class='lparen'>(</span><span class='ivar'>@repository</span><span class='comma'>,</span> <span class='symbol'>:state</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>open</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:per_page</span> <span class='op'>=></span> <span class='int'>50</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='ivar'>@pull_request_details</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_pull_requests'>pull_requests</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span>
<span class='id identifier rubyid_issue'>issue</span> <span class='op'>=</span> <span class='id identifier rubyid_github_query'><span class='object_link'><a href="top-level-namespace.html#github_query-instance_method" title="#github_query (method)">github_query</a></span></span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_issue'>issue</span><span class='lparen'>(</span><span class='ivar'>@repository</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_number'>number</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Issue loaded: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_issue'>issue</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_notification_users'>notification_users</span> <span class='op'>=</span> <span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_notification_users'>notification_users</span> <span class='op'><<</span> <span class='id identifier rubyid_issue'>issue</span><span class='period'>.</span><span class='id identifier rubyid_assignee'>assignee</span><span class='period'>.</span><span class='id identifier rubyid_login'>login</span> <span class='kw'>if</span> <span class='id identifier rubyid_issue'>issue</span><span class='period'>.</span><span class='id identifier rubyid_assignee'>assignee</span>
<span class='id identifier rubyid_notification_users'>notification_users</span> <span class='op'><<</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_login'>login</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_login'>login</span>
<span class='id identifier rubyid_aging_pull_requests_notify'>aging_pull_requests_notify</span> <span class='op'>=</span> <span class='kw'>true</span>
<span class='id identifier rubyid_aging_pull_requests_num_days'>aging_pull_requests_num_days</span> <span class='op'>=</span> <span class='int'>7</span>
<span class='comment'># TODO: p.head.repo can be null if the fork repo is deleted. Need to protect that here.
</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_head'>head</span><span class='period'>.</span><span class='id identifier rubyid_repo'>repo</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Skipping potential PR (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_number'>number</span><span class='embexpr_end'>}</span><span class='tstring_content'>): Forked repo is null (deleted?)</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>else</span>
<span class='kw'>begin</span>
<span class='id identifier rubyid_pb'>pb</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="PotentialBuild.html" title="PotentialBuild (class)">PotentialBuild</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="PotentialBuild.html#initialize-instance_method" title="PotentialBuild#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='comma'>,</span> <span class='ivar'>@token</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_head'>head</span><span class='period'>.</span><span class='id identifier rubyid_repo'>repo</span><span class='period'>.</span><span class='id identifier rubyid_full_name'>full_name</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_head'>head</span><span class='period'>.</span><span class='id identifier rubyid_sha'>sha</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_head'>head</span><span class='period'>.</span><span class='id identifier rubyid_ref'>ref</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_head'>head</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_login'>login</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_number'>number</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_repo'>repo</span><span class='period'>.</span><span class='id identifier rubyid_full_name'>full_name</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_ref'>ref</span><span class='rparen'>)</span>
<span class='id identifier rubyid_configured_notifications'>configured_notifications</span> <span class='op'>=</span> <span class='id identifier rubyid_pb'>pb</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_notification_recipients'>notification_recipients</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_configured_notifications'>configured_notifications</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Merging notifications user: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_configured_notifications'>configured_notifications</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_notification_users'>notification_users</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_configured_notifications'>configured_notifications</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_aging_pull_requests_notify'>aging_pull_requests_notify</span> <span class='op'>=</span> <span class='id identifier rubyid_pb'>pb</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_aging_pull_requests_notification'>aging_pull_requests_notification</span>
<span class='id identifier rubyid_aging_pull_requests_num_days'>aging_pull_requests_num_days</span> <span class='op'>=</span> <span class='id identifier rubyid_pb'>pb</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_aging_pull_requests_numdays'>aging_pull_requests_numdays</span>
<span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_head'>head</span><span class='period'>.</span><span class='id identifier rubyid_repo'>repo</span><span class='period'>.</span><span class='id identifier rubyid_full_name'>full_name</span> <span class='op'>==</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_repo'>repo</span><span class='period'>.</span><span class='id identifier rubyid_full_name'>full_name</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Skipping pull-request originating from head repo: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_number'>number</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>else</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Found an external PR to add to potential_builds: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_number'>number</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='ivar'>@potential_builds</span> <span class='op'><<</span> <span class='id identifier rubyid_pb'>pb</span>
<span class='kw'>end</span>
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="DecentCIKnownError.html" title="DecentCIKnownError (class)">DecentCIKnownError</a></span></span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Skipping potential PR (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_number'>number</span><span class='embexpr_end'>}</span><span class='tstring_content'>): </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
<span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Skipping potential PR (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_number'>number</span><span class='embexpr_end'>}</span><span class='tstring_content'>): </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_backtrace'>backtrace</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>end</span> <span class='comment'># TODO: Should this be here?
</span>
<span class='ivar'>@pull_request_details</span> <span class='op'><<</span> <span class='lbrace'>{</span>
<span class='symbol'>:id</span> <span class='op'>=></span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_number'>number</span><span class='comma'>,</span>
<span class='symbol'>:creator</span> <span class='op'>=></span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_user'>user</span><span class='period'>.</span><span class='id identifier rubyid_login'>login</span><span class='comma'>,</span>
<span class='symbol'>:owner</span> <span class='op'>=></span> <span class='lparen'>(</span><span class='id identifier rubyid_issue'>issue</span><span class='period'>.</span><span class='id identifier rubyid_assignee'>assignee</span> <span class='op'>?</span> <span class='id identifier rubyid_issue'>issue</span><span class='period'>.</span><span class='id identifier rubyid_assignee'>assignee</span><span class='period'>.</span><span class='id identifier rubyid_login'>login</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='symbol'>:last_updated</span> <span class='op'>=></span> <span class='id identifier rubyid_issue'>issue</span><span class='period'>.</span><span class='id identifier rubyid_updated_at'>updated_at</span><span class='comma'>,</span>
<span class='symbol'>:repo</span> <span class='op'>=></span> <span class='ivar'>@repository</span><span class='comma'>,</span>
<span class='symbol'>:notification_users</span> <span class='op'>=></span> <span class='id identifier rubyid_notification_users'>notification_users</span><span class='comma'>,</span>
<span class='symbol'>:aging_pull_requests_notification</span> <span class='op'>=></span> <span class='id identifier rubyid_aging_pull_requests_notify'>aging_pull_requests_notify</span><span class='comma'>,</span>
<span class='symbol'>:aging_pull_requests_numdays</span> <span class='op'>=></span> <span class='id identifier rubyid_aging_pull_requests_num_days'>aging_pull_requests_num_days</span>
<span class='rbrace'>}</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="results_repositories-instance_method">
#<strong>results_repositories</strong> ⇒ <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
201
202
203
204
205
206
207</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/build.rb', line 201</span>
<span class='kw'>def</span> <span class='id identifier rubyid_results_repositories'>results_repositories</span>
<span class='id identifier rubyid_s'>s</span> <span class='op'>=</span> <span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='ivar'>@potential_builds</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span>
<span class='id identifier rubyid_s'>s</span> <span class='op'><<</span> <span class='lbracket'>[</span><span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_repository'>repository</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_results_repository'>results_repository</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_results_path'>results_path</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_pull_request?'>pull_request?</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_s'>s</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Thu May 18 10:34:59 2023 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.19 (ruby-2.7.0).
</div>
</div>
</body>
</html>