codepulse 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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 632b130d91677a3c461b9352908c9f0523fc402fe534ab41c7df9859eb3f4ec8
4
- data.tar.gz: b053c80b65509c185e73d1f0f2ad9e70fbae40d9dc877bf030fddf37f7cd8fc6
3
+ metadata.gz: 9864f8d6e808c28ec1f97134ddca4ddb8648f3e1b290381d78e9644527a7e011
4
+ data.tar.gz: d646eb794866fa95d92ea0eeaf81b84bd752212cb8378fe0e39300f4a401ca64
5
5
  SHA512:
6
- metadata.gz: 1f925aca5a64dbc2b3c6aa3811a9c986c0c874482edcc80c008e0732beadfaed0ab0e72f3f51a54006f8810557f6fff63c8dc09931c28895a2a7f7c40d7a069a
7
- data.tar.gz: 7839b516b6428ee42733d2474f310a90981c782bf8eed674a01ee4abdb8e56810c133dde059db595851f84712af7094ab5bc5cc13019c9f78a337f3e91c254eb
6
+ metadata.gz: 5f6f05cfb98debbd9940f9fed36534a4ce12745fd22945e5bc2b14037c98b267e46b70a1ecb1e9577d7ac9251f795822e82cfa888165e214db9fbf17cab5fd37
7
+ data.tar.gz: de6c71e276b2f0022e61c466b822c4f85ea246146e69217f45583042f6dc1095562a4f064b8cd4d836d7820a800fa1cfa94e3b39b55e184d87c57d1913867358
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 WorkBright
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/README.md CHANGED
@@ -6,16 +6,23 @@ Terminal tool to analyze GitHub pull request pickup times, merge times, and size
6
6
 
7
7
  ### Prerequisites
8
8
 
9
- 1. Ruby 3.0+
10
- 2. Install GitHub CLI: https://cli.github.com
11
- 3. Authenticate:
9
+ 1. **Ruby 3.0+**
10
+ 2. **GitHub CLI** — [Install](https://cli.github.com) and authenticate:
12
11
  ```sh
13
12
  gh auth login
14
13
  ```
15
14
 
16
- ### Install the gem
15
+ ### Install from RubyGems
17
16
 
18
17
  ```sh
18
+ gem install codepulse
19
+ ```
20
+
21
+ ### Install from source
22
+
23
+ ```sh
24
+ git clone https://github.com/WorkBright/codepulse.git
25
+ cd codepulse
19
26
  gem build codepulse.gemspec
20
27
  gem install codepulse-0.1.0.gem
21
28
  ```
@@ -43,7 +50,7 @@ codepulse owner/repo
43
50
  ### Examples
44
51
 
45
52
  ```sh
46
- # Summary for current repo (last 14 business days)
53
+ # Summary for current repo (last 7 business days)
47
54
  codepulse
48
55
 
49
56
  # Summary for specific repo
@@ -60,41 +67,40 @@ codepulse rails/rails --business-days 30 --limit 50
60
67
 
61
68
  ```
62
69
  ======================================================================================
63
- PR PICKUP TIME REPORT | Last 14 business days (Dec 4 - Dec 24)
70
+ PR PICKUP TIME REPORT | Last 7 business days (Dec 16 - Dec 24)
64
71
  rails/rails
65
72
  ======================================================================================
66
73
 
74
+ Pickup time: Time from PR creation to first reviewer response (business days)
75
+ Time to merge: Time from PR creation to merge (business days)
76
+ PR size: Net lines changed (additions - deletions)
77
+ Files changed: Number of files modified in the PR
78
+
67
79
  --------------------------------------------------------------------------------------
68
- SUMMARY (18 PRs with pickup, 5 pending)
80
+ SUMMARY (18 PRs with pickup, 3 awaiting pickup, 2 merged without pickup)
69
81
  --------------------------------------------------------------------------------------
70
82
 
71
83
  Average pickup time: 4h 23m
72
84
  Median pickup time: 2h 15m
73
- p95 pickup time: 1d 8h
74
85
  Fastest pickup time: 8m
75
86
  Slowest pickup time: 2d 5h
76
87
 
77
- Average time to merge: 1d 2h
78
- Median time to merge: 18h 30m
79
- p95 time to merge: 3d 4h
80
- Fastest time to merge: 45m
81
- Slowest time to merge: 5d 12h
82
-
83
88
  ...
84
89
  ```
85
90
 
86
91
  ## What is calculated
87
92
 
88
- - **Pickup time**: Time from PR creation to first non-author response (business days only, Mon–Fri)
89
- - **Time to merge**: Time from PR creation to merge
93
+ - **Pickup time**: Time from PR creation to first non-author response (business days, excludes US holidays)
94
+ - **Time to merge**: Time from PR creation to merge (business days, excludes US holidays)
90
95
  - **PR size**: Net lines (additions − deletions) and files changed
91
- - **Stats**: Average, median, p95, fastest, slowest
96
+ - **Stats**: Average, median, p95 (when 50+ PRs), fastest, slowest
92
97
 
93
98
  ## Filters
94
99
 
95
- - **Default 14 business days**: Only analyzes recent PRs
100
+ - **Default 7 business days**: Only analyzes recent PRs
96
101
  - **Closed unmerged PRs excluded**: Abandoned PRs are filtered out
97
102
  - **Bots ignored**: Copilot, GitHub Actions, and other bot reviewers don't count as pickup
103
+ - **US holidays excluded**: Federal holidays are not counted as business days
98
104
 
99
105
  ## Development
100
106
 
@@ -105,7 +111,11 @@ rake test
105
111
  # Lint (requires: gem install rubocop)
106
112
  rubocop
107
113
 
108
- # Rebuild and install
114
+ # Build and install locally
109
115
  gem build codepulse.gemspec
110
116
  gem install codepulse-0.1.0.gem
111
117
  ```
118
+
119
+ ## License
120
+
121
+ MIT
@@ -10,7 +10,7 @@ module Codepulse
10
10
  # Main entry point: outputs metrics as a formatted report.
11
11
  def output(metrics, repo:, detailed: true, business_days: nil)
12
12
  if metrics.empty?
13
- puts "No pull requests found for #{repo}."
13
+ print_no_pull_requests_message(repo, business_days)
14
14
  return
15
15
  end
16
16
 
@@ -28,6 +28,15 @@ module Codepulse
28
28
 
29
29
  private
30
30
 
31
+ def print_no_pull_requests_message(repo, business_days)
32
+ if business_days
33
+ puts "No pull requests found for #{repo} in the last #{business_days} business days."
34
+ puts "To look further back, use: codepulse --business-days N #{repo}"
35
+ else
36
+ puts "No pull requests found for #{repo}."
37
+ end
38
+ end
39
+
31
40
  def output_report(metrics, excluded:, repo:, business_days:, detailed:)
32
41
  print_report_header(repo, business_days)
33
42
  puts
@@ -7,6 +7,7 @@ module Codepulse
7
7
 
8
8
  # Bot accounts to ignore when calculating pickup time.
9
9
  IGNORED_ACTORS = [
10
+ # GitHub Copilot
10
11
  "copilot-pull-request-reviewer",
11
12
  "copilot-pull-request-reviewer[bot]",
12
13
  "copilot",
@@ -14,8 +15,58 @@ module Codepulse
14
15
  "copilot-bot",
15
16
  "github-copilot",
16
17
  "github-copilot[bot]",
18
+
19
+ # GitHub Actions
17
20
  "github-actions",
18
- "github-actions[bot]"
21
+ "github-actions[bot]",
22
+
23
+ # AI Coding Assistants
24
+ "cursor[bot]",
25
+ "cursor-bot",
26
+ "codex[bot]",
27
+ "openai-codex",
28
+ "coderabbitai[bot]",
29
+ "coderabbit",
30
+ "sourcery-ai[bot]",
31
+ "sourcery[bot]",
32
+ "codeium[bot]",
33
+ "tabnine[bot]",
34
+ "sweep[bot]",
35
+ "sweepai[bot]",
36
+ "qodo-merge-pro[bot]",
37
+ "codiumai[bot]",
38
+ "amazon-q[bot]",
39
+ "codewhisperer[bot]",
40
+ "aider[bot]",
41
+ "devin[bot]",
42
+ "devin-ai[bot]",
43
+
44
+ # Dependency Management
45
+ "dependabot[bot]",
46
+ "dependabot",
47
+ "renovate[bot]",
48
+ "renovate",
49
+
50
+ # Security & Code Quality
51
+ "snyk-bot",
52
+ "snyk[bot]",
53
+ "sonarcloud[bot]",
54
+ "sonarqube[bot]",
55
+ "codecov[bot]",
56
+ "codecov",
57
+ "coveralls[bot]",
58
+ "deepsource-autofix[bot]",
59
+ "deepsource[bot]",
60
+ "codefactor[bot]",
61
+ "lgtm-com[bot]",
62
+
63
+ # Deployment & Merge Bots
64
+ "vercel[bot]",
65
+ "netlify[bot]",
66
+ "mergify[bot]",
67
+ "kodiakhq[bot]",
68
+ "imgbot[bot]",
69
+ "allstar[bot]"
19
70
  ].freeze
20
71
 
21
72
  def initialize(client:)
data/lib/codepulse.rb CHANGED
@@ -9,5 +9,5 @@ require_relative "codepulse/formatter"
9
9
  require_relative "codepulse/cli"
10
10
 
11
11
  module Codepulse
12
- VERSION = "0.1.0"
12
+ VERSION = "0.1.1"
13
13
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codepulse
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
  - Patrick Navarro
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-12-24 00:00:00.000000000 Z
10
+ date: 2025-12-26 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Terminal tool to analyze GitHub pull request pickup times, merge times,
13
13
  and sizes using the gh CLI.
@@ -18,6 +18,7 @@ executables:
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
+ - LICENSE
21
22
  - README.md
22
23
  - bin/codepulse
23
24
  - lib/codepulse.rb
@@ -29,7 +30,8 @@ files:
29
30
  - lib/codepulse/metrics_calculator.rb
30
31
  - lib/codepulse/time_helpers.rb
31
32
  homepage: https://github.com/WorkBright/codepulse
32
- licenses: []
33
+ licenses:
34
+ - MIT
33
35
  metadata:
34
36
  rubygems_mfa_required: 'true'
35
37
  homepage_uri: https://github.com/WorkBright/codepulse