gh_issues 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4408bd107953aa18e66a9564141c0c05e682808
4
- data.tar.gz: c6dd87cc8d8e11ff9fb51d4701e9f508a531ceaa
3
+ metadata.gz: 1dd8b8c06779222fcdd87ff73b7876e61709bba2
4
+ data.tar.gz: e7e6e47581fdb9efdb907c226d5f27d95362fc39
5
5
  SHA512:
6
- metadata.gz: 83a80fdf5956e3c5f6fe40c8f2184f44093904b312165cfe88bde60a2e7eea92f15a0cadffd35af792e2f998075bbe32d3b14a2e59d59bb41d2e0840eeaf2dd7
7
- data.tar.gz: 960d5a65caa9936ff5ba339558a8f18646007e1dcc239a927a778a826096bff1592777f01f9ee24731c4afdbe648c54db4de92babb8e8026fb15558799c79d31
6
+ metadata.gz: 0e46b1b3a109f18973b5ff116f808de163095019f4c53ac69ef49ee7978655fab4071caddd3779787309c524c907a32c6dac606def238d2b17523da2f610c127
7
+ data.tar.gz: 2fd5053e441f64da2fe40f928e4d8b130481322c9332fee24eab3bf9d432dd689289473e91ed863e60408021ac8577d509fe40ec6f4d3384a21b4fdf846779b7
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
- ![Version](https://img.shields.io/badge/version-0.1.1-yellow.svg)
1
+ [![Build Status](https://travis-ci.org/vigo/gh-issues.svg?branch=master)](https://travis-ci.org/vigo/gh-issues)
2
+ ![Version](https://img.shields.io/badge/version-0.2.0-yellow.svg)
2
3
 
3
4
  # GitHub Issues
4
5
 
@@ -9,9 +10,9 @@ amount of repos, this tool will become more handy.
9
10
 
10
11
  I need this tool for couple of reasons:
11
12
 
12
- 1. I need to list all issues of my all repositories without knowing the repo url.
13
- 1. I need to list a specific issue from a specific repo with full details.
14
- 1. I need to see my current issues which are related to GitHub account.
13
+ 1. list all issues of my all repositories without knowing the repo url.
14
+ 1. list a specific issue from a specific repo with full details.
15
+ 1. see my current issues which are related to GitHub account.
15
16
 
16
17
  ## Installation
17
18
 
@@ -26,33 +27,49 @@ gem install gh_issues
26
27
  You need to create a [GitHub token](https://github.com/settings/tokens/new) or
27
28
  use existing token of yours. Set your environment variable as:
28
29
 
30
+ ![GitHub token settings](github_token.png)
31
+
32
+ If you don’t want this app to access your **private repos** please check only: **public_repo**
33
+
34
+ ***
35
+
29
36
  ```bash
30
37
  export GH_ISSUES_TOKEN=your-token-here
31
38
  ```
32
39
 
33
40
  If you like to get colored output by default, set:
41
+
34
42
  ```bash
35
43
  export GH_ISSUES_COLORIZE=1
36
44
  ```
37
45
 
38
- All commands:
46
+ You can change your date format via `GH_ISSUES_DATE_FORMAT` variable. Default
47
+ value is : `%d %B %Y, %H:%M, %A`. This is `Time.strftime` format. More
48
+ information can be found [here](http://ruby-doc.org/core-2.3.0/Time.html#method-i-strftime).
49
+ Set your default such as:
39
50
 
40
51
  ```bash
41
- Commands:
42
- gh_issues all # List all open issues, grouped by owner
43
- gh_issues help [COMMAND] # Describe available commands or one specific command
44
- gh_issues list OWNER_NAME # List issues belongs to owner
45
- gh_issues show REPO_NAME [ISSUE_NUMBER] # Show issues of REPO_NAME or ISSUE
46
- gh_issues version # Version information
47
-
48
- Options:
49
- [--color], [--no-color]
50
- [--sort-by=count]
51
- # Default: name
52
- [--sort-order=desc]
53
- # Default: asc
52
+ export GH_ISSUES_DATE_FORMAT='%A %B %-d, %Y, %H:%M' # example
54
53
  ```
55
54
 
55
+
56
+ All commands:
57
+
58
+ Commands:
59
+ gh_issues all # List all open issues, grouped by owner
60
+ gh_issues help [COMMAND] # Describe available commands or one specific command
61
+ gh_issues list OWNER_NAME # List issues belongs to owner
62
+ gh_issues show REPO_NAME [ISSUE_NUMBER] # Show issues of REPO_NAME or ISSUE
63
+ gh_issues version # Version information
64
+
65
+ Options:
66
+ [--color], [--no-color]
67
+ [--sort-by=count]
68
+ # Default: name
69
+ [--sort-order=desc]
70
+ # Default: asc
71
+
72
+
56
73
  ### all
57
74
 
58
75
  Lists all repos with open issues. Here is my repos:
@@ -189,7 +206,7 @@ Result:
189
206
  ## Development
190
207
 
191
208
  After checking out the repo, run `bin/setup` to install dependencies. Then,
192
- run `rake test` to run the tests. You can also run `bin/console` for an
209
+ run `bundle exec rake test` to run the tests. You can also run `bin/console` for an
193
210
  interactive prompt that will allow you to experiment.
194
211
 
195
212
  To install this gem onto your local machine, run `bundle exec rake install`. To
data/github_token.png ADDED
Binary file
data/lib/gh_issues/cli.rb CHANGED
@@ -10,6 +10,7 @@ require 'gh_issues'
10
10
 
11
11
  TERMINAL_WIDTH = `tput cols`.strip.to_i
12
12
  WRAP_TEXT_AT = 78
13
+ DEFAULT_DATE_FORMAT = ENV['GH_ISSUES_DATE_FORMAT'] || "%d %B %Y, %H:%M, %A"
13
14
 
14
15
  module GhIssues
15
16
  class TextRenderer < Redcarpet::Render::StripDown
@@ -106,8 +107,8 @@ module GhIssues
106
107
  t.add_row [colorize("Assignees", :yellow), issue[:assignees].join(', ')] if issue[:assignees].count > 0
107
108
  t.add_separator
108
109
 
109
- created_at = issue[:created_at].strftime("%d %B %Y, %H:%M, %A")
110
- updated_at = issue[:updated_at].strftime("%d %B %Y, %H:%M, %A")
110
+ created_at = issue[:created_at].strftime(DEFAULT_DATE_FORMAT)
111
+ updated_at = issue[:updated_at].strftime(DEFAULT_DATE_FORMAT)
111
112
 
112
113
  now = Time.now
113
114
  created_at_diff = TimeDifference.between(now, issue[:created_at]).in_days.to_i
@@ -1,3 +1,3 @@
1
1
  module GhIssues
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gh_issues
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uğur Özyılmazel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-01 00:00:00.000000000 Z
11
+ date: 2016-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -181,6 +181,7 @@ files:
181
181
  - bin/setup
182
182
  - exe/gh_issues
183
183
  - gh_issues.gemspec
184
+ - github_token.png
184
185
  - lib/gh_issues.rb
185
186
  - lib/gh_issues/cli.rb
186
187
  - lib/gh_issues/version.rb