bug_courier 0.1.2 → 1.1.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
  SHA256:
3
- metadata.gz: e48e86c7ecb95c3d83ffc86bc0c285803f9163b8aeb90114732fd23d63adaddb
4
- data.tar.gz: 80ab05d9b5a09b88f8e110f15f2abc5e2562590786e052a7ce1cc17f1d0f4527
3
+ metadata.gz: 06a59c97109d6c2be94e289fd37b08cab43775c9d5d2df0da6689e278cb29d78
4
+ data.tar.gz: 7cd768fbe85fbe9168ffc50eb5e63257abbf6a559d7740b0be588d5410a79582
5
5
  SHA512:
6
- metadata.gz: 0e1bb472dcec08118df3fe6212dbd7271db21320b9defbd5c4ee255592d9fe97733711c1d94a94ee94778d580ca48ce7b49a0b66da82a65ba45cb545e8116e4e
7
- data.tar.gz: a62b3d2e0db8bf307718c4c050a3cac21afab66a2541bfb0424d6cf01febf9b1da8b65f2010e5cc4588e0c0e943585813db5f2db53ced46da9588eebf226af1c
6
+ metadata.gz: 8c5420222883243f061d091ec1cf676a9c2f8f8e6524a1a0b3247c76eff4968e031d3c93483bf697afb35cb4eda6b72002d630f4e4b919fbf5109b3fe8ca549a
7
+ data.tar.gz: 3e754802ec9770ebce2663c6944fbaf38289657bd02493de66e4212326c192d3cb534c4b86bde27f9f299d03d6fe3bc8231684c95e264c4d7fac1409fdc2f045
data/README.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  A Rails gem that automatically creates GitHub issues when uncaught exceptions occur. Includes deduplication (comments on existing open issues instead of creating duplicates), rate limiting, request context capture, and async reporting.
4
4
 
5
+ ## Auto-Fix Bugs with GitHub Copilot
6
+
7
+ BugCourier turns your production exceptions into GitHub issues — and **GitHub Copilot can automatically fix them**.
8
+
9
+ When Copilot is enabled on your repository, it can pick up BugCourier-created issues (complete with backtraces, request context, and error fingerprints) and open pull requests with fixes. This creates a powerful loop:
10
+
11
+ 1. An uncaught exception occurs in production
12
+ 2. BugCourier creates a detailed GitHub issue with the full error context
13
+ 3. Copilot reads the issue and opens a PR with a proposed fix
14
+ 4. You review and merge
15
+
16
+ No manual triage. No copying stack traces. Just assign Copilot to BugCourier issues and let it work.
17
+
5
18
  ## Installation
6
19
 
7
20
  Add to your Gemfile:
@@ -3,7 +3,7 @@
3
3
  module BugCourier
4
4
  class Configuration
5
5
  attr_accessor :access_token, :repo, :labels, :assignees, :enabled,
6
- :deduplicate, :rate_limit, :callback
6
+ :deduplicate, :rate_limit, :callback, :ignore_exceptions
7
7
 
8
8
  def initialize
9
9
  @access_token = nil
@@ -14,6 +14,7 @@ module BugCourier
14
14
  @deduplicate = true
15
15
  @rate_limit = 10 # max issues per hour
16
16
  @callback = nil
17
+ @ignore_exceptions = []
17
18
  end
18
19
 
19
20
  def valid?
@@ -30,6 +30,7 @@ module BugCourier
30
30
  def handle(exception, env = {})
31
31
  return unless BugCourier.configuration.enabled
32
32
  return unless BugCourier.configuration.valid?
33
+ return if ignored?(exception)
33
34
  return unless @rate_limiter.allow?
34
35
 
35
36
  title = build_title(exception)
@@ -137,5 +138,14 @@ module BugCourier
137
138
 
138
139
  params.except("controller", "action").to_s.slice(0, 500)
139
140
  end
141
+
142
+ def ignored?(exception)
143
+ BugCourier.configuration.ignore_exceptions.any? do |klass|
144
+ klass = Object.const_get(klass) if klass.is_a?(String)
145
+ exception.is_a?(klass)
146
+ rescue NameError
147
+ false
148
+ end
149
+ end
140
150
  end
141
151
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BugCourier
4
- VERSION = "0.1.2"
4
+ VERSION = "1.1.0"
5
5
  end
@@ -34,6 +34,12 @@ module BugCourier
34
34
  # Maximum number of issues to create per hour (default: 10)
35
35
  # config.rate_limit = 10
36
36
 
37
+ # Exception classes to ignore — these will not be reported (default: [])
38
+ # config.ignore_exceptions = [
39
+ # ActiveRecord::RecordNotFound,
40
+ # ActionController::RoutingError,
41
+ # ]
42
+
37
43
  # Optional callback — called after issue creation or commenting
38
44
  # config.callback = ->(action, issue) {
39
45
  # Rails.logger.info("[BugCourier] \#{action}: \#{issue['html_url']}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bug_courier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steffen Hansen