Skip to content

Commit

Permalink
Add default value for TravisCI org/com config
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Cummer committed Jul 31, 2018
1 parent a375d54 commit 9d01fc0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _site/content/posts/modules/travisci.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ travisci:
left: 1
height: 1
width: 2
refreshInterval: 900
pro: false
refreshInterval: 900
```
### Attributes
Expand Down
2 changes: 1 addition & 1 deletion docs/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Key: ↓ Action: Scroll down the list.</description>
Displays build information for your Travis CI account.
Source Code wtf/travisci/ Required ENV Variables Key: WTF_TRAVIS_API_TOKEN Value: Your Travis CI API access token.
Keyboard Commands None.
Configuration travisci:enabled:trueposition:top:4left:1height:1width:2refreshInterval:900 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false.
Configuration travisci:enabled:trueposition:top:4left:1height:1width:2pro:falserefreshInterval:900 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false.
position Defines where in the grid this module&amp;rsquo;s widget will be displayed. refreshInterval How often, in seconds, this module will update its data.</description>
</item>

Expand Down
2 changes: 1 addition & 1 deletion docs/posts/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Key: ↓ Action: Scroll down the list.</description>
Displays build information for your Travis CI account.
Source Code wtf/travisci/ Required ENV Variables Key: WTF_TRAVIS_API_TOKEN Value: Your Travis CI API access token.
Keyboard Commands None.
Configuration travisci:enabled:trueposition:top:4left:1height:1width:2refreshInterval:900 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false.
Configuration travisci:enabled:trueposition:top:4left:1height:1width:2pro:falserefreshInterval:900 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false.
position Defines where in the grid this module&amp;rsquo;s widget will be displayed. refreshInterval How often, in seconds, this module will update its data.</description>
</item>

Expand Down
5 changes: 5 additions & 0 deletions docs/posts/modules/travisci/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ <h2 id="configuration">Configuration</h2>
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>height<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
</span><span class="w"> </span>pro<span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">900</span></code></pre></div>
<h3 id="attributes">Attributes</h3>

Expand All @@ -176,6 +177,10 @@ <h3 id="attributes">Attributes</h3>
How often, in seconds, this module will update its data. <br />
Values: A positive integer, <code>0..n</code>.</p>

<p><code>pro</code> <br />
Determines whether or not this module will use the Pro version of Travis CI.<br />
Values: <code>true</code>, <code>false</code>.</p>

</div>

<div class="footer">
Expand Down
2 changes: 1 addition & 1 deletion travisci/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const APIEnvToken = "WTF_TRAVIS_API_TOKEN"
func BuildsFor() (*Builds, error) {
builds := &Builds{}

pro := wtf.Config.UBool("wtf.mods.travisci.pro")
pro := wtf.Config.UBool("wtf.mods.travisci.pro", false)
travisAPIURL.Host = hosts[pro]

resp, err := travisRequest("builds")
Expand Down

0 comments on commit 9d01fc0

Please sign in to comment.