github_daily_update 0.1.0 → 0.1.1

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDg5N2IyZWIzMzNkMzg4MDQyMzkzN2Q5NmQzYjJhN2E2MTJkNGRkOA==
4
+ NjEwYmIwYzc5NWI1NjI4NWU0OGI1NmZlOWRiZGM2NWVlOTQ4NGMwMQ==
5
5
  data.tar.gz: !binary |-
6
- NzMxODU1YzBjYmNkYzhiZmY0MGQ5MzAwYzcyYWUzZGMyNjNlNzczZQ==
6
+ YzliMzdmZjBlMzBlODJiMzQxNzE4MmZlZDMwYWUxZTgwYThjN2E2Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDA4N2IxNjY5MjA5ZmRmZGQ2OTc0OTBjNWFlYWM0N2E5NWNjMGM0N2RiZDVm
10
- ZjQwNzc3Y2I4NTZkYjE0MmYxZTU0NmUyNDRjMjIzMjM3ZjkxMGZjZWJiMmYw
11
- NTI5MmEwYmJmMjkxZTY0NDE4YjUyZDhkOTE0MDU1MTI3MGE3MDU=
9
+ OGM2YjJkYTVmZmY5YTJiMWJkZTUwMTc2N2QwZjZiZDdhNjQ3YzczMGRlZTdj
10
+ Y2FiNzdmNmRmYjY5N2UyYWI3YjY4ODQ4NGUwZDM0NmFlMTA5ZjlmYzQwNWE0
11
+ N2FiZGI0YzlhZTAxOGIwMWIxZDVkNTliYzkwNzgzNDE0NTM2ZWY=
12
12
  data.tar.gz: !binary |-
13
- ZDQ2ZDY2MDM3ZjJmOWIxNzE0ZGUxZDVmYmRmZjhjMjkxYjQwMTM2ZDcyYWY4
14
- MjZlYzcwYmFiYWQ1ODI2MjYzYmI2Zjc1OWIyNjdiZjRjODc3MGE3ZGI0Mzdl
15
- ODA1MWQ5OGYxNjliMWY2OGIwMWMxYzBiYzlmMGJhZWZmMWIzYjA=
13
+ NmYwYjQ3NmRkNGM5Mjk3NThlYTY5YTM4YmRhYzFhYjEwYWE4MDJjMTBlNTMz
14
+ ZjY3ZTg5Njc0M2E2NzgwNWQ4OWE4NGQ3YTk5MTk3YjRmZDdjOGFjYzY1MTAw
15
+ MDgwZTViYmMxYTc1YWY4ZGQ0Njg5NWQ0ZDNhYzI0ODU0OTJlMDE=
data/README.md CHANGED
@@ -1,28 +1,42 @@
1
- # GithubDailyUpdate
1
+ # GitHub Daily Update
2
2
 
3
- TODO: Write a gem description
3
+ I have found that a daily update of what was merged in the last 24 hours and what pull requests are open is useful in daily standups.
4
+
5
+ This gem provides a command line utility tha automates the process of creating a list of merges and open pull requests for an organization.
6
+
7
+ It is written the be extensible and provide different reporters so that you can customize the type of report you want to generate.
4
8
 
5
9
  ## Installation
6
10
 
7
- Add this line to your application's Gemfile:
11
+ Install it from the command line:
8
12
 
9
- gem 'github_daily_update'
13
+ $ gem install github_daily_update
10
14
 
11
- And then execute:
15
+ ## Usage
12
16
 
13
- $ bundle
17
+ Simply run the executable from the command line:
14
18
 
15
- Or install it yourself as:
19
+ $ github_daily_update
16
20
 
17
- $ gem install github_daily_update
21
+ The script will ask you to login to GitHub and then will ask you for an Organization name. Once you've provided that, it will take a few minutes to run and then print out the report.
18
22
 
19
- ## Usage
23
+ The current report looks like this:
24
+
25
+ ```markdown
26
+ ## Merge Report
27
+
28
+ - Org/repo#18: Fix issue with user signup flow
29
+
30
+ ## Open Pulls
20
31
 
21
- TODO: Write usage instructions here
32
+ - Org/repo#568: Add all as a report match option
33
+ - Org/repo#567: Save the estimated budget for a campaign
34
+ - Org/repo#58: Add best practices guide to app
35
+ ```
22
36
 
23
37
  ## Contributing
24
38
 
25
- 1. Fork it ( http://github.com/<my-github-username>/github_daily_update/fork )
39
+ 1. Fork it ( http://github.com/jhubert/github_daily_update/fork )
26
40
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
41
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
42
  4. Push to the branch (`git push origin my-new-feature`)
@@ -20,8 +20,15 @@ if ENV['GITHUB_ORG'].nil?
20
20
  ENV['GITHUB_ORG'] = prompt('GitHub Org: ')
21
21
  end
22
22
 
23
+ if ENV['DAY_SPAN'].nil?
24
+ ENV['DAY_SPAN'] = prompt('How many days back? (1): ') || 1
25
+ end
26
+
23
27
  require 'github_daily_update'
24
28
 
25
29
  puts 'Generating Report...'
26
- daily_update = GithubDailyUpdate::Report.new(org: ENV['GITHUB_ORG'])
27
- puts daily_update.generate.join("\n")
30
+ daily_update = GithubDailyUpdate::Report.new(
31
+ org: ENV['GITHUB_ORG'],
32
+ day_span: ENV['DAY_SPAN'].to_i
33
+ )
34
+ puts daily_update.generate.join("\n\n")
@@ -21,10 +21,14 @@ class GithubDailyUpdate::Reporter::Merged < GithubDailyUpdate::Reporter::Base
21
21
 
22
22
  def merged_pull_requests
23
23
  Octokit.organization_events(options[:org]).select do |e|
24
- e.created_at > (Time.now - (60 * 60 * 24)) &&
24
+ e.created_at > (Time.now - time_span) &&
25
25
  e.type == 'PullRequestEvent' &&
26
26
  e.payload.action == 'closed' &&
27
27
  e.payload.pull_request.merged
28
28
  end
29
29
  end
30
+
31
+ def time_span
32
+ 60 * 60 * 24 * (options[:day_span].to_i || 1)
33
+ end
30
34
  end
@@ -1,4 +1,4 @@
1
1
  # Use Semantic versioning
2
2
  module GithubDailyUpdate
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_daily_update
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Baker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-21 00:00:00.000000000 Z
11
+ date: 2014-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit