rspec-mergify 2026.11.6 → 2026.11.7

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: fd9f3096f59aa2c036d7ee8c88fdd2b0fd9254e33adfcfb6d76cbe8b3435aaec
4
- data.tar.gz: f0c82f3e5628b8597fc4ad50bfff380e74bc39461e625e9ca0f1e4fd04c8d5e1
3
+ metadata.gz: 7a97d5aac040d3dda3213bfbc3a103484a2daef27369ab01d615b106c8eea787
4
+ data.tar.gz: ead8c307f4954d930dc3c8c17bc8b2ce31b565928f9d6083e4f5c0792ed0f692
5
5
  SHA512:
6
- metadata.gz: 1a12e274d5684cba6569e5cb5472efbded55bc1545cfdaa7f92791baa97f06b4eba9b1abf9a8e3930a898afbe163b9d37e57742ef5171e7f851498b6c0795aef
7
- data.tar.gz: 10c6fe419be0c056063efe008357770d3b8e7b4f03457b88406a51db6640445076b61845fe2916f73f0a4fe39abb7608276127d610e7c02aab1b261704e2fb69
6
+ metadata.gz: 204d896c79964e33726e8403c9a6dd60bca5235c76103db3b5174c54bcf5b53e1051005fd60939c7648007b1cebf1c8e512fd1ce45a376c577581b096d7a5062
7
+ data.tar.gz: 8ca29e9defdf6571efaed492fc0cd55e6ed6cc5514f6988f20e2b6593ffc48c63ee4debbc906e6aeaaa247ee3f288491ae6f4387e6c735c31d77d19b48f1bc99
data/README.md CHANGED
@@ -10,6 +10,7 @@ RSpec plugin for [Mergify Test Engine](https://docs.mergify.com/test-engine/).
10
10
  - **Flaky test detection** — Intelligently reruns tests to detect flakiness with budget constraints
11
11
  - **Test retry** — On the default branch, runs a failing example again, once rspec-retry's tries failed, within a time budget Mergify sets
12
12
  - **Test quarantine** — Quarantines failing tests so they don't block CI
13
+ - **Test skip** — Skips the examples a team chose in Mergify not to run, with the reason
13
14
  - **Test selection** — Runs first the examples a merge-queue bisection step failed in the step above, and stops once one fails again
14
15
 
15
16
  ## Installation
@@ -44,6 +44,8 @@ module Mergify
44
44
  config.prepend_before(:suite) { Configuration.attach_formatter(config) }
45
45
  end
46
46
 
47
+ config.before(:suite) { Configuration.skip_examples } if reports?
48
+
47
49
  # Flaky detection: prepared for every example of the run.
48
50
  config.before(:suite) do
49
51
  ci = Mergify::RSpec.test_run
@@ -127,6 +129,21 @@ module Mergify
127
129
  )
128
130
  end
129
131
 
132
+ # Have RSpec skip the examples the session says not to run, as it skips
133
+ # an `xit`: each reports as pending, with the session's reason, and none
134
+ # of its `before`, `after` or `around` hooks runs. An example the user
135
+ # already skipped keeps the user's reason.
136
+ def skip_examples
137
+ quarantine = Mergify::RSpec.test_run&.quarantined_tests
138
+ return unless quarantine
139
+
140
+ names = Mergify::RSpec.test_run.names
141
+ collected.each do |example|
142
+ reason = quarantine.skip_reason(names.keys(example))
143
+ example.metadata[:skip] ||= reason if reason
144
+ end
145
+ end
146
+
130
147
  # The examples RSpec will run, in its order.
131
148
  def collected
132
149
  ::RSpec.world.example_groups.flat_map(&:descendants).flat_map { |group| ::RSpec.world.filtered_examples[group] }
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Mergify
4
4
  module RSpec
5
- # The quarantined tests for a run, and RSpec's side of them.
5
+ # The quarantined and skipped tests for a run, and RSpec's side of them.
6
6
  #
7
7
  # The session loads the list (`Session#load_before_tests`). Which example it
8
8
  # covers, what that example's result says, the branch it is fetched for
@@ -22,6 +22,12 @@ module Mergify
22
22
  @list.include?(keys)
23
23
  end
24
24
 
25
+ # Why the session says not to run an example known by `keys`, or nil to
26
+ # run it.
27
+ def skip_reason(keys)
28
+ @list.skip_reason(keys)
29
+ end
30
+
25
31
  # Account for an example known by `keys` that ended with `outcome`
26
32
  # (`'passed'`, `'failed'` or `'skipped'`, before the quarantine turned a
27
33
  # failure into `pending`), as `{ 'quarantined' => bool, 'absorbed' =>
@@ -8,6 +8,6 @@ module Mergify
8
8
  # which resolved against whatever repository happened to be the working
9
9
  # directory at load time -- the monorepo's namespaced tags here, the user's
10
10
  # own tags once the gem was installed.
11
- VERSION = '2026.11.6'
11
+ VERSION = '2026.11.7'
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-mergify
3
3
  version: !ruby/object:Gem::Version
4
- version: 2026.11.6
4
+ version: 2026.11.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mergify
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - '='
31
31
  - !ruby/object:Gem::Version
32
- version: 2026.11.6
32
+ version: 2026.11.7
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - '='
38
38
  - !ruby/object:Gem::Version
39
- version: 2026.11.6
39
+ version: 2026.11.7
40
40
  description: 'RSpec integration for Mergify Test Engine: OpenTelemetry tracing, flaky
41
41
  test detection, and test quarantine. Requires a Mergify account (set MERGIFY_TOKEN
42
42
  in CI); free for open source.'