mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Adds the Github module to the documentation
This commit is contained in:
parent
c74db0177a
commit
33278dcc47
@ -23,7 +23,7 @@ Available modules:
|
||||
<li><a href="/posts/modules/bamboohr">BambooHR</a>
|
||||
<li><a href="/posts/modules/clocks">Clocks</a>
|
||||
<li><a href="/posts/modules/git">Git</a>
|
||||
<li><a href="/posts/modules/github" class="disabled">Github</a>
|
||||
<li><a href="/posts/modules/github">Github</a>
|
||||
<li><a href="/posts/modules/gcal" class="disabled">Google Calendar</a>
|
||||
<li><a href="/posts/modules/jira" class="disabled">Jira</a>
|
||||
<li><a href="/posts/modules/newrelic">New Relic</a>
|
||||
|
@ -74,7 +74,6 @@ git:
|
||||
The number of past commits to display. <br />
|
||||
Values: A positive integer, `0..n`.
|
||||
|
||||
|
||||
`enabled` <br />
|
||||
Determines whether or not this module is executed and if its data displayed onscreen. <br />
|
||||
Values: `true`, `false`.
|
||||
|
88
_site/content/posts/modules/github.md
Normal file
88
_site/content/posts/modules/github.md
Normal file
@ -0,0 +1,88 @@
|
||||
---
|
||||
title: "Github"
|
||||
date: 2018-05-09T19:20:20-07:00
|
||||
draft: false
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Displays information about git repositories hosted on Github: open
|
||||
review requests, and open pull requests.
|
||||
|
||||
<img src="/imgs/modules/github.png" width="640" height="384" alt="github screenshot" />
|
||||
|
||||
#### Open Review Requests
|
||||
|
||||
Displays all open code review requests assigned to you.
|
||||
|
||||
#### Open Pull Requests
|
||||
|
||||
Displays all open pull requests created by you.
|
||||
|
||||
## Source Code
|
||||
|
||||
```bash
|
||||
wtf/github/
|
||||
```
|
||||
|
||||
## Required ENV Variables
|
||||
|
||||
<span class="caption">Key:</span> `WTF_GITHUB_TOKEN` <br />
|
||||
<span class="caption">Action:</span> Your <a href="https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization">Github API</a> token.
|
||||
|
||||
## Keyboard Commands
|
||||
|
||||
<span class="caption">Key:</span> `/` <br />
|
||||
<span class="caption">Action:</span> Open/close the widget's help window.
|
||||
|
||||
<span class="caption">Key:</span> `h` <br />
|
||||
<span class="caption">Action:</span> Show the previous git repository.
|
||||
|
||||
<span class="caption">Key:</span> `l` <br />
|
||||
<span class="caption">Action:</span> Show the next git repository.
|
||||
|
||||
<span class="caption">Key:</span> `←` <br />
|
||||
<span class="caption">Action:</span> Show the previous git repository.
|
||||
|
||||
<span class="caption">Key:</span> `→` <br />
|
||||
<span class="caption">Action:</span> Show the next git repository.
|
||||
|
||||
## Configuration
|
||||
|
||||
```yaml
|
||||
github:
|
||||
enabled: true
|
||||
position:
|
||||
top: 2
|
||||
left: 3
|
||||
height: 2
|
||||
width: 2
|
||||
refreshInterval: 300
|
||||
repositories:
|
||||
wesker-api: "UmbrellaCorp"
|
||||
wtf: "senorprogrammer"
|
||||
username: "senorprogrammer"
|
||||
```
|
||||
|
||||
### Attributes
|
||||
|
||||
`enabled` <br />
|
||||
Determines whether or not this module is executed and if its data displayed onscreen. <br />
|
||||
Values: `true`, `false`.
|
||||
|
||||
`position` <br />
|
||||
Defines where in the grid this module's widget will be displayed. <br />
|
||||
|
||||
`refreshInterval` <br />
|
||||
How often, in seconds, this module will update its data. <br />
|
||||
Values: A positive integer, `0..n`.
|
||||
|
||||
`repositories` <br />
|
||||
A list of key/value pairs each describing a Github repository to fetch data
|
||||
for. <br />
|
||||
<span class="caption">Key:</span> The name of the repository. <br />
|
||||
<span class="caption">Value:</span> The name of the account or organization that owns the repository.
|
||||
|
||||
`username` <br />
|
||||
Your Github username. Used to figure out which review requests you've
|
||||
been added to.
|
BIN
_site/static/imgs/modules/github.png
Normal file
BIN
_site/static/imgs/modules/github.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
@ -20,7 +20,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -62,7 +62,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
BIN
docs/imgs/modules/git.png
Normal file
BIN
docs/imgs/modules/git.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 129 KiB |
BIN
docs/imgs/modules/github.png
Normal file
BIN
docs/imgs/modules/github.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
@ -61,7 +61,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -6,11 +6,25 @@
|
||||
<description>Recent content on WTF</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<lastBuildDate>Wed, 09 May 2018 14:20:48 -0700</lastBuildDate>
|
||||
<lastBuildDate>Wed, 09 May 2018 19:20:20 -0700</lastBuildDate>
|
||||
|
||||
<atom:link href="http://wtfutil.com/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
<item>
|
||||
<title>Github</title>
|
||||
<link>http://wtfutil.com/posts/modules/github/</link>
|
||||
<pubDate>Wed, 09 May 2018 19:20:20 -0700</pubDate>
|
||||
|
||||
<guid>http://wtfutil.com/posts/modules/github/</guid>
|
||||
<description>Description Displays information about git repositories hosted on Github: open review requests, and open pull requests.
|
||||
Open Review Requests Displays all open code review requests assigned to you.
|
||||
Open Pull Requests Displays all open pull requests created by you.
|
||||
Source Code wtf/github/ Required ENV Variables Key: WTF_GITHUB_TOKEN Action: Your Github API token.
|
||||
Keyboard Commands Key: / Action: Open/close the widget&rsquo;s help window.
|
||||
Key: h Action: Show the previous git repository.</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Git</title>
|
||||
<link>http://wtfutil.com/posts/modules/git/</link>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -62,7 +62,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
@ -89,6 +89,13 @@
|
||||
<h1 class="title">Posts</h1>
|
||||
<ul class="posts">
|
||||
<li>
|
||||
<span>
|
||||
<a href="http://wtfutil.com/posts/modules/github/">Github</a>
|
||||
|
||||
<time class="pull-right post-list">May 09, 2018</time>
|
||||
|
||||
</span>
|
||||
</li><li>
|
||||
<span>
|
||||
<a href="http://wtfutil.com/posts/modules/git/">Git</a>
|
||||
|
||||
|
@ -6,11 +6,25 @@
|
||||
<description>Recent content in Posts on WTF</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<lastBuildDate>Wed, 09 May 2018 14:20:48 -0700</lastBuildDate>
|
||||
<lastBuildDate>Wed, 09 May 2018 19:20:20 -0700</lastBuildDate>
|
||||
|
||||
<atom:link href="http://wtfutil.com/posts/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
<item>
|
||||
<title>Github</title>
|
||||
<link>http://wtfutil.com/posts/modules/github/</link>
|
||||
<pubDate>Wed, 09 May 2018 19:20:20 -0700</pubDate>
|
||||
|
||||
<guid>http://wtfutil.com/posts/modules/github/</guid>
|
||||
<description>Description Displays information about git repositories hosted on Github: open review requests, and open pull requests.
|
||||
Open Review Requests Displays all open code review requests assigned to you.
|
||||
Open Pull Requests Displays all open pull requests created by you.
|
||||
Source Code wtf/github/ Required ENV Variables Key: WTF_GITHUB_TOKEN Action: Your Github API token.
|
||||
Keyboard Commands Key: / Action: Open/close the widget&rsquo;s help window.
|
||||
Key: h Action: Show the previous git repository.</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Git</title>
|
||||
<link>http://wtfutil.com/posts/modules/git/</link>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
@ -108,6 +108,8 @@
|
||||
<p>Displays information about local git repositories: branch, changed
|
||||
files, and recent commits.</p>
|
||||
|
||||
<p><img src="/imgs/modules/git.png" width="720" height="292" alt="git screenshot" /></p>
|
||||
|
||||
<h4 id="branch">Branch</h4>
|
||||
|
||||
<p>Displays the of the currently-active git branch.</p>
|
||||
|
197
docs/posts/modules/github/index.html
Normal file
197
docs/posts/modules/github/index.html
Normal file
@ -0,0 +1,197 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us" class="wf-firasans-n4-active wf-active">
|
||||
<head>
|
||||
<link href="http://gmpg.org/xfn/11" rel="profile">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- Enable responsiveness on mobile devices -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
|
||||
|
||||
<meta name="generator" content="Hugo 0.38.2" />
|
||||
|
||||
<title>Github | WTF</title>
|
||||
<meta content="Github - WTF" property="og:title">
|
||||
<meta content=" - " property="og:description">
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i|Roboto+Mono:300,300i,400,400i" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://wtfutil.com/css/print.css" media="print">
|
||||
<link rel="stylesheet" href="http://wtfutil.com/css/poole.css">
|
||||
<link rel="stylesheet" href="http://wtfutil.com/css/hyde.css">
|
||||
<link rel="stylesheet" href="http://wtfutil.com/css/wtf.css">
|
||||
<!-- Font-Awesome -->
|
||||
<script defer src="https://use.fontawesome.com/releases/v5.0.9/js/all.js" integrity="sha384-8iPTk2s/jMVj81dnzb/iFR2sdA7u06vHJyyLlAd4snFpCl/SnyUjRrbdJsw1pGIl" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Customised CSS -->
|
||||
<link rel="stylesheet" href="http://wtfutil.com/css/custom.css">
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<!-- Icons -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
|
||||
<link rel="shortcut icon" href="/favicon.png">
|
||||
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="sidebar">
|
||||
<div class="container sidebar-sticky">
|
||||
<div class="sidebar-about text-center">
|
||||
|
||||
<a href="http://wtfutil.com/"> <img src="/img/wtf.png" alt="WFT Logo" class="" width=""> </a>
|
||||
<p class="lead">
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3 style="color: white;">Content</h3>
|
||||
<ul style="list-style-type: none;">
|
||||
<li class="sidebar-list-item-1"><a href="/posts/installation/" class="disabled">Installation</a></li>
|
||||
<li class="sidebar-list-item-1"><a href="/posts/configuration/">Configuration</a></li>
|
||||
</ul>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
<li class="sidebar-list-item-1"><a href="/posts/modules/">Modules</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p class="copyright">
|
||||
© 2018 Chris Cummer.
|
||||
<br />
|
||||
<a href="https://creativecommons.org/licenses/by/4.0">Some Rights Reserved</a>.
|
||||
</p>
|
||||
<p class="copyright">
|
||||
Built with <a href="https://gohugo.io/">Hugo</a> & <a href="https://github.com/htr3n/hyde-hyde">hyde-hyde</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content container">
|
||||
<div class="post">
|
||||
<h1>Github</h1>
|
||||
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<span class="text-left post-date meta">
|
||||
|
||||
|
||||
<i class="fas fa-calendar-alt"></i> May 09, 2018
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
<i class="fas fa-clock"></i> 1 min read
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h2 id="description">Description</h2>
|
||||
|
||||
<p>Displays information about git repositories hosted on Github: open
|
||||
review requests, and open pull requests.</p>
|
||||
|
||||
<p><img src="/imgs/modules/github.png" width="640" height="384" alt="github screenshot" /></p>
|
||||
|
||||
<h4 id="open-review-requests">Open Review Requests</h4>
|
||||
|
||||
<p>Displays all open code review requests assigned to you.</p>
|
||||
|
||||
<h4 id="open-pull-requests">Open Pull Requests</h4>
|
||||
|
||||
<p>Displays all open pull requests created by you.</p>
|
||||
|
||||
<h2 id="source-code">Source Code</h2>
|
||||
|
||||
<pre><code class="language-bash">wtf/github/
|
||||
</code></pre>
|
||||
|
||||
<h2 id="required-env-variables">Required ENV Variables</h2>
|
||||
|
||||
<p><span class="caption">Key:</span> <code>WTF_GITHUB_TOKEN</code> <br />
|
||||
<span class="caption">Action:</span> Your <a href="https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization">Github API</a> token.</p>
|
||||
|
||||
<h2 id="keyboard-commands">Keyboard Commands</h2>
|
||||
|
||||
<p><span class="caption">Key:</span> <code>/</code> <br />
|
||||
<span class="caption">Action:</span> Open/close the widget’s help window.</p>
|
||||
|
||||
<p><span class="caption">Key:</span> <code>h</code> <br />
|
||||
<span class="caption">Action:</span> Show the previous git repository.</p>
|
||||
|
||||
<p><span class="caption">Key:</span> <code>l</code> <br />
|
||||
<span class="caption">Action:</span> Show the next git repository.</p>
|
||||
|
||||
<p><span class="caption">Key:</span> <code>←</code> <br />
|
||||
<span class="caption">Action:</span> Show the previous git repository.</p>
|
||||
|
||||
<p><span class="caption">Key:</span> <code>→</code> <br />
|
||||
<span class="caption">Action:</span> Show the next git repository.</p>
|
||||
|
||||
<h2 id="configuration">Configuration</h2>
|
||||
|
||||
<pre><code class="language-yaml">github:
|
||||
enabled: true
|
||||
position:
|
||||
top: 2
|
||||
left: 3
|
||||
height: 2
|
||||
width: 2
|
||||
refreshInterval: 300
|
||||
repositories:
|
||||
wesker-api: "UmbrellaCorp"
|
||||
wtf: "senorprogrammer"
|
||||
username: "senorprogrammer"
|
||||
</code></pre>
|
||||
|
||||
<h3 id="attributes">Attributes</h3>
|
||||
|
||||
<p><code>enabled</code> <br />
|
||||
Determines whether or not this module is executed and if its data displayed onscreen. <br />
|
||||
Values: <code>true</code>, <code>false</code>.</p>
|
||||
|
||||
<p><code>position</code> <br />
|
||||
Defines where in the grid this module’s widget will be displayed. <br /></p>
|
||||
|
||||
<p><code>refreshInterval</code> <br />
|
||||
How often, in seconds, this module will update its data. <br />
|
||||
Values: A positive integer, <code>0..n</code>.</p>
|
||||
|
||||
<p><code>repositories</code> <br />
|
||||
A list of key/value pairs each describing a Github repository to fetch data
|
||||
for. <br />
|
||||
<span class="caption">Key:</span> The name of the repository. <br />
|
||||
<span class="caption">Value:</span> The name of the account or organization that owns the repository.</p>
|
||||
|
||||
<p><code>username</code> <br />
|
||||
Your Github username. Used to figure out which review requests you’ve
|
||||
been added to.</p>
|
||||
|
||||
</div>
|
||||
<div class="footer">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
@ -120,7 +120,7 @@ display in the “Clocks” widget.</p>
|
||||
<li><a href="/posts/modules/bamboohr">BambooHR</a>
|
||||
<li><a href="/posts/modules/clocks">Clocks</a>
|
||||
<li><a href="/posts/modules/git">Git</a>
|
||||
<li><a href="/posts/modules/github" class="disabled">Github</a>
|
||||
<li><a href="/posts/modules/github">Github</a>
|
||||
<li><a href="/posts/modules/gcal" class="disabled">Google Calendar</a>
|
||||
<li><a href="/posts/modules/jira" class="disabled">Jira</a>
|
||||
<li><a href="/posts/modules/newrelic">New Relic</a>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -2,6 +2,11 @@
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<url>
|
||||
<loc>http://wtfutil.com/posts/modules/github/</loc>
|
||||
<lastmod>2018-05-09T19:20:20-07:00</lastmod>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://wtfutil.com/posts/modules/git/</loc>
|
||||
<lastmod>2018-05-09T14:20:48-07:00</lastmod>
|
||||
@ -64,7 +69,7 @@
|
||||
|
||||
<url>
|
||||
<loc>http://wtfutil.com/posts/</loc>
|
||||
<lastmod>2018-05-09T14:20:48-07:00</lastmod>
|
||||
<lastmod>2018-05-09T19:20:20-07:00</lastmod>
|
||||
<priority>0</priority>
|
||||
</url>
|
||||
|
||||
@ -75,7 +80,7 @@
|
||||
|
||||
<url>
|
||||
<loc>http://wtfutil.com/</loc>
|
||||
<lastmod>2018-05-09T14:20:48-07:00</lastmod>
|
||||
<lastmod>2018-05-09T19:20:20-07:00</lastmod>
|
||||
<priority>0</priority>
|
||||
</url>
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">Github</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
||||
|
@ -15,11 +15,11 @@ const helpText = `
|
||||
Keyboard commands for Git:
|
||||
|
||||
/: Show/hide this help window
|
||||
h: Previous weather location
|
||||
l: Next weather location
|
||||
h: Previous git repository
|
||||
l: Next git repository
|
||||
|
||||
arrow left: Previous weather location
|
||||
arrow right: Next weather location
|
||||
arrow left: Previous git repository
|
||||
arrow right: Next git repository
|
||||
`
|
||||
|
||||
type Widget struct {
|
||||
|
@ -11,6 +11,17 @@ import (
|
||||
// Config is a pointer to the global config object
|
||||
var Config *config.Config
|
||||
|
||||
const helpText = `
|
||||
Keyboard commands for Git:
|
||||
|
||||
/: Show/hide this help window
|
||||
h: Previous git repository
|
||||
l: Next git repository
|
||||
|
||||
arrow left: Previous git repository
|
||||
arrow right: Next git repository
|
||||
`
|
||||
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
|
||||
@ -63,14 +74,14 @@ func (widget *Widget) Prev() {
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) buildRepoCollection(repoData map[string]interface{}) []*GithubRepo {
|
||||
githubColl := []*GithubRepo{}
|
||||
githubRepos := []*GithubRepo{}
|
||||
|
||||
for name, owner := range repoData {
|
||||
repo := NewGithubRepo(name, owner.(string))
|
||||
githubColl = append(githubColl, repo)
|
||||
githubColl = append(githubRepos, repo)
|
||||
}
|
||||
|
||||
return githubColl
|
||||
return githubRepos
|
||||
}
|
||||
|
||||
func (widget *Widget) currentData() *GithubRepo {
|
||||
@ -86,6 +97,15 @@ func (widget *Widget) currentData() *GithubRepo {
|
||||
}
|
||||
|
||||
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
switch string(event.Rune()) {
|
||||
case "h":
|
||||
widget.Prev()
|
||||
return nil
|
||||
case "l":
|
||||
widget.Next()
|
||||
return nil
|
||||
}
|
||||
|
||||
switch event.Key() {
|
||||
case tcell.KeyLeft:
|
||||
widget.Prev()
|
||||
|
Loading…
x
Reference in New Issue
Block a user