gh-cards 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '07629067776ce059225686bf45244ee46075e49a278c51a2a86b3f40ed028f01'
4
- data.tar.gz: 1eb4656405f1fda42fa3b422f31e67ebc6f8e2aa4b849cd033b4c39777ba0086
3
+ metadata.gz: ffcb44c41e909ba458443b3c8ca7e5b4542da1b97e117f7035e8e8aa500f4e78
4
+ data.tar.gz: 2177a0f6725b21a7e96d3bae81d20cf9116000e366e1b9ed4871a55d7eb3547f
5
5
  SHA512:
6
- metadata.gz: 0dc8f8dae97af766abb9241f7100aedffb08abe1428b869d6e1cc8b2204ecc00deff15908c809530a60faea0a63a2fef94b94f6442839926f5e73e4385b07619
7
- data.tar.gz: d6313c9c14325677f56e595dbf0b25012225fc5e174c9e9bde419e9137f3cf947d4417aeeb7cfdfe98795f2dd5c81d1293a2c41de2334174ca028b83af9fb4af
6
+ metadata.gz: 6592bb2490b22cff266d1c897e61e7ea9acdd5521ede7d398c906480cd6a4ae1cf5ae8f4d36365118dc164be663b69bd5ee1fa2d84c925125e75011f057d41a4
7
+ data.tar.gz: 330ce1d2aeb424a0332fda8acf1773273635e64e042d4c248ff1f4fa0ae1bc09470a1418a2713a8dcad869ce9aaa9d04504c9f14817ce38cc584da6316f0c92d
data/.gh-cards/cards.html CHANGED
@@ -1,13 +1,14 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
3
  <head>
4
- <title>Cards for JSainsburyPLC/gh-cards</title>
4
+ <title>Cards for devopsmakers/gh-cards</title>
5
5
  <meta charset="utf-8">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
7
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
8
8
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
9
9
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
10
10
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
11
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/font/octicons.min.css">
11
12
  <style>
12
13
  .card-deck .card {
13
14
  max-width: calc(33% - 30px);
@@ -28,21 +29,25 @@
28
29
  <div class="card-body">
29
30
  <h4 class="card-title"><span class="font-weight-bold">#1</span> Test Issue</h4>
30
31
 
32
+ <h6 class="text-secondary"><span class="octicon octicon-milestone" aria-hidden="true"></span>Test Milestone</h6>
33
+ <br />
34
+
35
+
31
36
  <h6 class="text-secondary">Labels:</h6>
32
37
  <div class="small text-secondary test-lowercase">
33
38
 
34
39
  bug<br />
35
40
 
36
- good first issue<br />
41
+ enhancement<br />
37
42
 
38
- help wanted<br />
43
+ good first issue<br />
39
44
 
40
45
  </div>
41
46
 
42
47
  </div>
43
48
  <div class="card-footer small text-secondary">
44
49
  Created by: Tim Birkett<br />
45
- at 2019-11-07
50
+ at 2019-11-12
46
51
  </div>
47
52
  </div>
48
53
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.2.0
2
+
3
+ Add an issues milestone to card objects and update default template
4
+
1
5
  # 0.1.0
2
6
 
3
7
  Initial release
data/README.md CHANGED
@@ -8,6 +8,18 @@ Create HTML format cards from Github Issues for printing
8
8
  gem install gh-cards
9
9
  ```
10
10
 
11
+ ### Pre-requisites
12
+
13
+ 1. Create a Github Personal Access Token with **repo** access - https://github.com/settings/tokens/new
14
+
15
+ 2. Configure your `~/.netrc` file with:
16
+ ```
17
+ machine api.github.com
18
+ login <<username>>
19
+ password <<access-token>>
20
+ ```
21
+ and set it's permissions: `chmod 0600 ~/.netrc`
22
+
11
23
  ## Usage
12
24
 
13
25
  The `gh-cards` cli tool is designed to be run inside a repo. It will create a
@@ -71,6 +83,7 @@ The cards passed to the ERB are an array of objects:
71
83
  :color=>"008672"
72
84
  }
73
85
  ],
86
+ :milestone=>"Test Milestone",
74
87
  :created_by=>"Tim Birkett",
75
88
  :created_at=>2019-11-07 15:07:31 UTC
76
89
  },
@@ -1,5 +1,5 @@
1
1
  module Gh
2
2
  module Cards
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
data/lib/gh/cards.rb CHANGED
@@ -86,11 +86,11 @@ module Gh
86
86
  :title => issue[:title],
87
87
  :number => issue[:number],
88
88
  :labels => issue[:labels].map{|label| {:name => label[:name], :color => label[:color]}},
89
+ :milestone => issue[:milestone] ? issue[:milestone][:title] : nil,
89
90
  :created_by => _get_gh_user_name(issue[:user][:login]),
90
91
  :created_at => issue[:created_at]
91
92
  }
92
93
  end
93
-
94
94
  return @cards
95
95
  end
96
96
 
@@ -8,6 +8,7 @@
8
8
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
9
9
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
10
10
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
11
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/font/octicons.min.css">
11
12
  <style>
12
13
  .card-deck .card {
13
14
  max-width: calc(33% - 30px);
@@ -27,6 +28,10 @@
27
28
  </div>
28
29
  <div class="card-body">
29
30
  <h4 class="card-title"><span class="font-weight-bold">#<%= card[:number] %></span> <%= card[:title] %></h4>
31
+ <% if card[:milestone] %>
32
+ <h6 class="text-secondary"><span class="octicon octicon-milestone" aria-hidden="true"></span><%= card[:milestone] %></h6>
33
+ <br />
34
+ <% end %>
30
35
  <% if card[:labels].length > 0 %>
31
36
  <h6 class="text-secondary">Labels:</h6>
32
37
  <div class="small text-secondary test-lowercase">
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gh-cards
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Birkett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2019-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit
@@ -171,7 +171,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
173
  requirements: []
174
- rubygems_version: 3.0.3
174
+ rubyforge_project:
175
+ rubygems_version: 2.7.7
175
176
  signing_key:
176
177
  specification_version: 4
177
178
  summary: Create HTML format cards from Github Issues for printing