kettle-jem 7.1.41 → 7.1.43

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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +69 -7
  4. data/README.md +27 -0
  5. data/lib/kettle/jem/ci/harden_macos_ca_bundle.sh +75 -0
  6. data/lib/kettle/jem/tasks/install_task.rb +2 -2
  7. data/lib/kettle/jem/templates/.duel.rb.example +10 -0
  8. data/lib/kettle/jem/templates/.git-hooks/commit-msg.example +6 -6
  9. data/lib/kettle/jem/templates/.git-hooks/commit-subjects-goalie.txt.example +7 -1
  10. data/lib/kettle/jem/templates/.github/workflows/current.yml.example +1 -1
  11. data/lib/kettle/jem/templates/.github/workflows/dependency-review.yml.example +1 -1
  12. data/lib/kettle/jem/templates/.github/workflows/discord-notifier.yml.example +1 -1
  13. data/lib/kettle/jem/templates/.github/workflows/perf-comment.yml.example +92 -0
  14. data/lib/kettle/jem/templates/.github/workflows/perf.yml.example +152 -69
  15. data/lib/kettle/jem/templates/.structuredmerge/kettle-jem.yml.example +2 -2
  16. data/lib/kettle/jem/templates/Appraisals.example +12 -0
  17. data/lib/kettle/jem/templates/CONTRIBUTING.md.example +5 -1
  18. data/lib/kettle/jem/templates/Gemfile.example +3 -1
  19. data/lib/kettle/jem/templates/gem.gemspec.example +10 -6
  20. data/lib/kettle/jem/templates/gemfiles/modular/debug.gemfile.example +1 -1
  21. data/lib/kettle/jem/templates/gemfiles/modular/documentation.gemfile.example +5 -5
  22. data/lib/kettle/jem/templates/gemfiles/modular/duel.gemfile.example +1 -1
  23. data/lib/kettle/jem/templates/gemfiles/modular/optional.gemfile.example +1 -1
  24. data/lib/kettle/jem/templates/gemfiles/modular/ostruct/r4/v0.6.gemfile.example +1 -1
  25. data/lib/kettle/jem/templates/gemfiles/modular/rspec.gemfile.example +12 -4
  26. data/lib/kettle/jem/templates/gemfiles/modular/rspec_junit_formatter/r2/v0.6.gemfile.example +7 -0
  27. data/lib/kettle/jem/templates/gemfiles/modular/rspec_junit_formatter/r3/v0.8.gemfile.example +2 -0
  28. data/lib/kettle/jem/templates/gemfiles/modular/rspec_junit_formatter/r3.2/v0.6.gemfile.example +7 -0
  29. data/lib/kettle/jem/templates/gemfiles/modular/rspec_junit_formatter/r4/v0.8.gemfile.example +2 -0
  30. data/lib/kettle/jem/templates/gemfiles/modular/style_local.gemfile.example +1 -1
  31. data/lib/kettle/jem/templates/gemfiles/modular/templating.gemfile.example +2 -1
  32. data/lib/kettle/jem/templates/gemfiles/modular/templating_local.gemfile.example +34 -18
  33. data/lib/kettle/jem/templates/gemfiles/modular/x_std_libs.gemfile.example +10 -2
  34. data/lib/kettle/jem/templates/readme/partials/configuration.md.example +3 -0
  35. data/lib/kettle/jem/templates/shim/Gemfile.example +1 -1
  36. data/lib/kettle/jem/templates/shim/gem.gemspec.example +3 -3
  37. data/lib/kettle/jem/version.rb +1 -1
  38. data/lib/kettle/jem.rb +793 -99
  39. data.tar.gz.sig +3 -2
  40. metadata +1188 -1037
  41. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f44a87b5964c590bf6eb74a9da0ae7900cac81230aea488043d27668c4339cee
4
- data.tar.gz: 350675e9ec0c38f3104318288598c7bfc814c1a36c290ed1cb31ace8fd55093f
3
+ metadata.gz: 90d9232615b86a4faca376ab6adaa2b7764b20966c2b2c138b16a7f2dacc022b
4
+ data.tar.gz: edbe4b4455b6f1d49b207728ad43325618a82dc0ae32c7dabe1b1a6a5cac0209
5
5
  SHA512:
6
- metadata.gz: 3b30a4785a25f30cff74549eb28b0c1ccc716d1f549572a385935f06d3191cd109df50589e48c50a401e47dcf4f4dec2715fd1b4ccfac58941ae71cf89f6ce40
7
- data.tar.gz: 1c5335c6579f99a7a993d463287b3a7ffee8bff522dc58151ac35e3ed8c8e3fa37457117adb1b8f261449edd3179efd47e4fdd53a471f165e37fe986aba1e578
6
+ metadata.gz: 912fd66bc0040ea4ae432806dab26de6dcfb9f417dd8c23a8dbe4491c3e9b66f9588759f48804db931252aeb1e7f864743877c2bec61a8abe45482a4a11daec9
7
+ data.tar.gz: 4a319538f077f936119d24598b4d87621ffce662829a003b5760bd73d35160759d6e5a9fea4ea846b2861c07fd443c4fb77b787e04b75f568b74381b536fc9f3
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -20,32 +20,92 @@ Please file a bug if you notice a violation of semantic versioning.
20
20
 
21
21
  ### Added
22
22
 
23
+ - `workflows.legacy_engines` opts an EOL engine workflow back in, as a list (`- truffleruby-24.2`) or a map keyed by workflow name with optional `mode` (`parallel` default, `serial` runs the job with `KETTLE_TEST_RUNNER=rspec`, `experimental` adds `experimental: true` to its matrix entry), `tracking` (issue URL) and `revisit_by` (date; a warning is reported once it has passed). Templating also reports a warning for every EOL workflow it removes, so the deletion is never silent.
24
+
23
25
  ### Changed
24
26
 
25
- - [kc] kettle-jem/prepare: updated 24 project files:
27
+ - Update the opt-in Duel integration to 0.1.8, including fork-safe comments, regression acceptance labels, merge queues, and last-passed push baselines. Existing .duel.rb configurations remain project-owned.
28
+
29
+ - **Breaking for generated CI:** workflows for EOL engine releases are no longer generated, and existing copies are deleted on the next templating run: `jruby-9.1`, `jruby-9.2`, `jruby-9.3`, `jruby-9.4`, `truffleruby-22.3`, `truffleruby-23.1`, `truffleruby-24.2`, `truffleruby-25.0`. An engine release is EOL when the CRuby it implements is EOL, and the TruffleRuby maintainers have asked projects to stop testing old releases. Their README compatibility badges become the static `(🚫CI)` variant (support is declared via the equivalent MRI job and rubocop-lts rules, as for Ruby < 2.4) instead of being removed. List a workflow under `workflows.legacy_engines` to keep it. See structuredmerge/structuredmerge-ruby#131.
30
+
31
+ - [kc] kettle-jem/prepare: updated 27 project files:
26
32
  - configuration (1)
27
- - dependencies (23)
33
+ - dependencies (26)
28
34
 
29
- - [kc] kettle-jem/template: updated 5 project files:
35
+ - [kc] kettle-jem/template: updated 6 project files:
30
36
  - code and tests (1)
31
- - dependencies (2)
37
+ - dependencies (3)
32
38
  - documentation (1)
33
39
  - other (1)
34
40
 
35
41
  - [kc] kettle-jem-deps-floor: Update kettle-jem template dependency floors:
36
- - addressable (>= 2.9.0 -> >= 2.9.1)
42
+ - addressable (>= 2.9.2 -> >= 2.10.0)
43
+ - duel (>= 0.1.8 -> >= 0.3.1)
44
+ - gem_bench (>= 2.0.5 -> >= 2.0.6)
45
+ - gitmoji-regex (>= 2.0.16 -> >= 2.0.17)
46
+ - kettle-changelog (>= 1.0.18 -> >= 1.0.20)
47
+ - kettle-dev (>= 3.1.29 -> >= 3.1.31)
48
+ - kettle-family (>= 1.3.43 -> >= 1.3.48)
49
+ - kramdown (>= 2.5.2 -> >= 2.6.1)
50
+ - require_bench (>= 1.0.4 -> >= 1.0.5)
51
+ - rspec-stubbed_env (>= 1.0.18 -> >= 1.0.19)
52
+ - stone_checksums (>= 1.0.10 -> >= 1.0.11)
53
+ - yaml-converter (>= 0.2.7 -> >= 0.2.8)
54
+ - yard-fence (>= 0.9.11 -> >= 0.9.12)
55
+ - yard-lint (>= 1.13.1 -> >= 1.15.0)
56
+ - yard-timekeeper (>= 0.2.10 -> >= 0.2.11)
37
57
 
38
58
  - [kc] kettle-jem-workflow-pins: Update pinned GitHub Actions in kettle-jem templates:
39
- - ruby/setup-ruby v1.335.0 (7f797815d8adceb1c412e7abefdd1ab4abc47a5f) -> v1.336.0 (de492cf36cbab201753d720ce4f4e336cd688c94)
59
+ - actions/dependency-review-action v5.0.0 (a1d282b36b6f3519aa1f3fc636f609c47dddb294) -> v5.0.1 (bbc44d14a204704ccc493733616cd1e93a0321ec)
60
+ - github/codeql-action/analyze v4.39.1 (9b3254085494b55a0f7c4c2b3d2d52cc712ce370) -> v4.39.5 (915412ff23e8b7659517e607487dbeae018f2934)
61
+ - github/codeql-action/autobuild v4.39.1 (9b3254085494b55a0f7c4c2b3d2d52cc712ce370) -> v4.39.5 (915412ff23e8b7659517e607487dbeae018f2934)
62
+ - github/codeql-action/init v4.39.1 (9b3254085494b55a0f7c4c2b3d2d52cc712ce370) -> v4.39.5 (915412ff23e8b7659517e607487dbeae018f2934)
63
+ - qltysh/qlty-action/coverage v2.5.0 (ebcd284bf32e36a030afe15f1e136c7be08b9506) -> v2.8.1 (56bee2d751c94b7bd8de22f64c9b5f398048e13f)
64
+ - ruby/setup-ruby v1.335.0 (7f797815d8adceb1c412e7abefdd1ab4abc47a5f) -> v1.344.0 (78c62f2208e480ce3d5ae4dfd9b9e181acf48b63)
65
+ - sarisia/actions-status-discord v1.16.0 (eb045afee445dc055c18d3d90bd0f244fd062708) -> v1.16.1 (74e2ad0c4e57ca8b9ba6aee75d5a7841497bbb87)
66
+
67
+ - Keep destination-preferred gemspec version loaders aligned with configured Ruby entrypoint paths.
68
+
69
+ - rspec.gemfile template uses released rspec_junit_formatter ~> 0.8 on Ruby >= 3.3 and keeps the pboling fork (invalid-UTF-8 fix) only for older Rubies ([#136](https://github.com/structuredmerge/structuredmerge-ruby/issues/136))
40
70
 
41
71
  ### Deprecated
42
72
 
43
73
  ### Removed
44
74
 
75
+ - Dead remove_excluded_changelog_transfer_entries helper; excluded-key pruning lives in kettle-changelog's TransferMerger, which now only prunes Unreleased (#151).
76
+
45
77
  ### Fixed
46
78
 
79
+ - Root Gemfile checksum fingerprints now include the config-derived default test bundle, so changing the default framework version triggers a re-render.
80
+
81
+ - README post-processing no longer treats badge image definitions (shields.io URLs) as workflow references, which stripped the inline badges that use them on every run. Compatible versioned engine badges (for example Truffle Ruby 33.0) whose workflow exists are now added as intended. (#133)
82
+
83
+ - Template sweep no longer deletes per-Ruby-version modular gemfile variants (x_std_libs r2/r3/r3.1 libs.gemfile and the std-lib gem variants they load) while a committed version-split loader still eval_gemfile's them; gemfile sweep deletions now respect the reference closure of the loaders that remain, so only genuinely unreferenced variants are pruned.
84
+
85
+ - [kc] alef-gemspec-spec-files: Kettle Jem now merges Alef-generated spec.files candidate lists and exclusion filters while retaining destination gem version metadata.
86
+
87
+ - Remove the Style/SafeNavigation offense from the generated gemfiles/modular/style_local.gemfile (spec&.version in the local_gem_satisfies? gemspec guard), so templated projects no longer carry a .rubocop_gradual.lock baseline entry for it
88
+
89
+ - Wire every configured StructuredMerge family gem in local templating bundles to prevent mixed local and registry dependency versions.
90
+
91
+ - Retemplating after an engine or workflow change no longer deletes transfer-keyed entries from released CHANGELOG sections (#150, #151); kettle-jem now requires kettle-changelog >= 1.0.19, which limits excluded-key pruning to `## [Unreleased]`. The spec that asserted the old remove-from-every-section behavior now asserts released history is preserved.
92
+
93
+ - README merge no longer duplicates template-owned sections nested inside a preserved destination section: preserved-section bodies now strip nested template-owned subsections, and extra preserved sections anchor only to template sections of equal-or-higher heading level so they are not inserted between a template parent and its nested sections
94
+
95
+ - Rakefile templating once again strips proven bundle-gem scaffold content (e.g. an eager require of rubocop/rake_task, which breaks release coverage boots) before merging the Rakefile template, instead of preserving scaffold lines forever as destination content; legitimate non-scaffold Rakefiles (alef/native, hand-maintained) keep their RSpec and default-task wiring. (GH#154)
96
+
97
+ - Templating now strips the bundle-gem scaffold's malformed contact line (a quoted mailto: href from bundler's CODE_OF_CONDUCT.md.tt .inspect bug) from the CODE_OF_CONDUCT.md merge input via markly AST, so newly scaffolded gems no longer carry an invalid URI that crashes yard-relative_markdown_links during the release changelog yard step. (GH#156)
98
+
47
99
  ### Security
48
100
 
101
+ ## [7.1.42] - 2026-10-31
102
+
103
+ - TAG: [v7.1.42][7.1.42t]
104
+
105
+ ### Changed
106
+
107
+ - Historical release notes are unavailable in this changelog.
108
+
49
109
  ## [7.1.41] - 2026-10-29
50
110
 
51
111
  - TAG: [v7.1.41][7.1.41t]
@@ -2562,7 +2622,9 @@ Please file a bug if you notice a violation of semantic versioning.
2562
2622
  - Released kettle-jem as part of the initial StructuredMerge Ruby 7.0.0 gem set.
2563
2623
  - Included packaged templates and parser-backed merge support for Ruby gem templating.
2564
2624
 
2565
- [Unreleased]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.41...HEAD
2625
+ [Unreleased]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.42...HEAD
2626
+ [7.1.42]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.41...v7.1.42
2627
+ [7.1.42t]: https://github.com/structuredmerge/structuredmerge-ruby/releases/tag/v7.1.42
2566
2628
  [7.1.41]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.40...v7.1.41
2567
2629
  [7.1.41t]: https://github.com/structuredmerge/structuredmerge-ruby/releases/tag/v7.1.41
2568
2630
  [7.1.40]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.39...v7.1.40
data/README.md CHANGED
@@ -137,6 +137,8 @@ gem install kettle-jem
137
137
 
138
138
  ## ⚙️ Configuration
139
139
 
140
+ Ruby-versioned modular Gemfile directories use the [kettle-rb RubySeriesBuckets rules](https://github.com/kettle-dev/kettle-rb/blob/main/lib/kettle/rb/ruby_series_buckets.rb) as their canonical definition. A named bucket such as `r3.2` ends at Ruby 3.2; it is an upper bound, not a minimum. A bare `r3` covers the remaining newer versions within Ruby 3. Buckets never cross major versions, and their ranges depend on the complete set of names: with `r3.2` and `r3`, the former covers Ruby 3.0 through 3.2 and the latter covers 3.3 onward within major 3. `r4` covers Ruby 4 separately.
141
+
140
142
  Each gem that uses Kettle::Jem has a `.kettle-jem.yml` file at its root. This file controls
141
143
  every aspect of how the template is applied.
142
144
 
@@ -550,12 +552,37 @@ files:
550
552
  Rakefile:
551
553
  strategy: merge
552
554
  preference: destination # keep your custom tasks
555
+ add_template_only_nodes: true
553
556
  certs/my.pem:
554
557
  strategy: raw_copy # binary file, no merging
555
558
  generated/report.md:
556
559
  strategy: keep_destination # never touch this file
557
560
  ```
558
561
 
562
+ ### Alef-generated Ruby packages
563
+
564
+ For an Alef-generated monorepo subgem, generate the package first, then hand
565
+ the Rakefile over to Kettle Jem by adding its repository-relative path to
566
+ `[workspace.ownership].user_owned` in `alef.toml`. Keep any existing entries:
567
+
568
+ ```toml
569
+ [workspace.ownership]
570
+ user_owned = [
571
+ "packages/ruby/Rakefile",
572
+ "packages/ruby/structuredmerge_core.gemspec",
573
+ ]
574
+ ```
575
+
576
+ Use the Rakefile override above in the package's Kettle Jem configuration.
577
+ The monorepo subgem profile seeds `accept_template` for a new configuration;
578
+ an explicit `merge` strategy survives subsequent profile synchronization.
579
+ Destination preference retains native build tasks and `rb_sys` configuration,
580
+ while template-only nodes add Kettle's tasks. Once handed off, Alef no longer
581
+ regenerates or verifies that file. Run `alef verify --exit-code` after the
582
+ handoff, and rerun Alef generation and Kettle templating to check convergence.
583
+ Configure the package as a member of `kettle-family` for its local-template
584
+ and release workflows.
585
+
559
586
  ### Environment Variables & CLI Options
560
587
 
561
588
  Kettle::Jem behavior is controlled via environment variables (which double as
@@ -0,0 +1,75 @@
1
+ #!/bin/sh
2
+ # Remove the eMudhra-related roots from the macOS system CA bundle.
3
+ #
4
+ # Apple's /etc/ssl/cert.pem still carries roots from the eMudhra incident, and the
5
+ # developer tools Apple ships (git, curl, python3) read that file, so a network
6
+ # attacker could tamper with downloads made during a release build. GitHub's macOS
7
+ # runners are ephemeral, so removing the roots at job start needs no re-application
8
+ # after OS updates. Reference: https://github.com/galadran/we-have-a-problem.com/issues/157
9
+ #
10
+ # It must run BEFORE the first step that downloads anything (actions/checkout runs
11
+ # git), so the workflows inline this exact file. A contract test keeps them identical.
12
+ #
13
+ # Matching is by certificate subject so no fingerprints need to be guessed; every
14
+ # removed certificate is printed with its SHA-256 fingerprint for the audit log, and
15
+ # the script fails if any matching certificate is still present afterwards.
16
+ #
17
+ # Environment (for tests): CA_BUNDLE (default /etc/ssl/cert.pem), SUDO (default sudo).
18
+ set -eu
19
+
20
+ bundle="${CA_BUNDLE:-/etc/ssl/cert.pem}"
21
+ sudo_cmd="${SUDO-sudo}"
22
+ work="$(mktemp -d)"
23
+ trap 'rm -rf "$work"' EXIT
24
+
25
+ matches() {
26
+ case "$1" in
27
+ *"AAA Certificate Services"* | *"emSign ECC Root CA - G3"* | *[eE][mM]udhra*) return 0 ;;
28
+ *) return 1 ;;
29
+ esac
30
+ }
31
+
32
+ total="$(grep -c -- '-----BEGIN CERTIFICATE-----' "$bundle")"
33
+ [ "$total" -ge 100 ] || { echo "refusing to edit $bundle: only $total certificates" >&2; exit 1; }
34
+
35
+ awk -v dir="$work" '
36
+ /-----BEGIN CERTIFICATE-----/ { if (out != "") close(out); n++; out = dir "/c" n ".pem" }
37
+ out != "" { print > out }
38
+ ' "$bundle"
39
+
40
+ : > "$work/clean.pem"
41
+ removed=0
42
+ i=1
43
+ while [ "$i" -le "$total" ]; do
44
+ file="$work/c$i.pem"
45
+ subject="$(openssl x509 -in "$file" -noout -subject 2>/dev/null || true)"
46
+ if [ -n "$subject" ] && matches "$subject"; then
47
+ fingerprint="$(openssl x509 -in "$file" -noout -fingerprint -sha256)"
48
+ echo "removing: $subject ($fingerprint)"
49
+ removed=$((removed + 1))
50
+ else
51
+ cat "$file" >> "$work/clean.pem"
52
+ fi
53
+ i=$((i + 1))
54
+ done
55
+
56
+ if [ "$removed" -gt 0 ]; then
57
+ $sudo_cmd tee "$bundle" < "$work/clean.pem" > /dev/null
58
+ fi
59
+
60
+ # Verify what is on disk now, not what we intended to write.
61
+ after="$(grep -c -- '-----BEGIN CERTIFICATE-----' "$bundle")"
62
+ [ "$after" -eq $((total - removed)) ] || { echo "certificate count mismatch: $after != $total - $removed" >&2; exit 1; }
63
+ rm -f "$work"/c*.pem
64
+ awk -v dir="$work" '
65
+ /-----BEGIN CERTIFICATE-----/ { if (out != "") close(out); n++; out = dir "/v" n ".pem" }
66
+ out != "" { print > out }
67
+ ' "$bundle"
68
+ for file in "$work"/v*.pem; do
69
+ subject="$(openssl x509 -in "$file" -noout -subject 2>/dev/null || true)"
70
+ if [ -n "$subject" ] && matches "$subject"; then
71
+ echo "still trusted after cleanup: $subject" >&2
72
+ exit 1
73
+ fi
74
+ done
75
+ echo "CA bundle $bundle: $total certificates, removed $removed, $after remain."
@@ -1001,7 +1001,7 @@ module Kettle
1001
1001
  command_env = (env || {}).to_h.dup
1002
1002
  strip_inherited_bundler_activation!(command_env)
1003
1003
  command_env["K_JEM_TEMPLATING"] = "false"
1004
- %w[KETTLE_DEV_DEV GALTZO_FLOSS_DEV STRUCTUREDMERGE_DEV].each do |key|
1004
+ %w[KETTLE_DEV_DEV GALTZO_FLOSS_DEV STRUCTUREDMERGE_DEV STRUCTUREDMERGE_CORE_DEV].each do |key|
1005
1005
  command_env[key] = "false" if command_env.key?(key)
1006
1006
  end
1007
1007
  gemfile = File.join(project_root.to_s, "Gemfile")
@@ -1862,7 +1862,7 @@ module Kettle
1862
1862
 
1863
1863
  commands = []
1864
1864
  commands << %w[git add -A -- .]
1865
- commands << ["git", "commit", "-m", "🎨 Template bootstrap by kettle-jem v#{Kettle::Jem::Version::VERSION}"]
1865
+ commands << ["git", "commit", "-m", "chore(templates): 🎨 bootstrap by kettle-jem v#{Kettle::Jem::Version::VERSION}"]
1866
1866
  {
1867
1867
  name: "bootstrap_commit",
1868
1868
  status: "ready",
@@ -22,4 +22,14 @@ Duel.configure do |c|
22
22
  # :results (passed or failed), :failures (failed, or couldn't compare),
23
23
  # or :never.
24
24
  # c.comment = :failures
25
+
26
+ # Which runs a regression fails: :every_run, or :pull_requests.
27
+ # c.fail_on = :every_run
28
+
29
+ # A pull request with this label accepts a regression.
30
+ c.accept_label = "duel: accept"
31
+
32
+ # Compare pushes with the last commit Duel passed, so small regressions
33
+ # accumulate. To accept one, run: git push origin main:duel/passed/main
34
+ c.push_base = :last_passed
25
35
  end
@@ -19,8 +19,10 @@ begin
19
19
  require "gitmoji/regex"
20
20
 
21
21
  full_text = File.read(ARGV[0])
22
- # Is the first character a GitMoji?
23
- gitmoji_index = full_text =~ Gitmoji::Regex::REGEX
22
+ # A Conventional Commit prefix may precede the Gitmoji in the subject.
23
+ subject = full_text.lines.first.to_s
24
+ subject = subject.sub(/\A[a-zA-Z][a-zA-Z0-9-]*(?:\([^\s()]+\))?!?: /, "")
25
+ gitmoji_index = subject =~ Gitmoji::Regex::REGEX
24
26
  if gitmoji_index == 0
25
27
  exit(0)
26
28
  else
@@ -37,12 +39,10 @@ begin
37
39
 
38
40
 
39
41
  Did you forget to add a relevant gitmoji? (see https://gitmoji.dev/ for tools)
40
- In this project, a Gitmoji must be the first grapheme of the commit message.
41
- What's a grapheme?
42
- A symbol rendered to be visually identifiable as a single character, but which may be composed of multiple Unicode code points)
42
+ A Gitmoji must start the subject, or follow a Conventional Commit prefix.
43
43
  Must match: #{Gitmoji::Regex::REGEX}
44
44
  #{"Found a gitmoji at character index #{gitmoji_index}... not good enough.\n" if gitmoji_index}
45
- Example: git commit -m "✨ My excellent new feature"
45
+ Example: git commit -m "feat(core): ✨ add feature"
46
46
 
47
47
  EOM
48
48
  puts denied
@@ -1,8 +1,14 @@
1
1
  🔖 Prepare release v
2
2
  🔒️ Checksums for v
3
+ chore(release): 🔖 prepare release v
4
+ chore(checksums): 🔒️ update checksums for v
5
+ chore(deps): 🔒️ update Bundler lockfiles
3
6
 
4
7
  # Lines beginning with # are ignored.
5
8
  # This file is read by .git-hooks/prepare-commit-msg in each project.
6
9
  # Each line of this file will be matched against the commit subject using `starts_with?`.
7
10
  # If any `starts_with?` match the project script bin/prepare-commit-msg will run.
8
- # 🔒️ Checksums for v is the standard commit message by stone_checksums.
11
+ # Both emoji-first (legacy tools) and Conventional Commit prefixed subjects are listed,
12
+ # so footer appending keeps working while generated subjects migrate to the prefixed format.
13
+ # 🔒️ Checksums for v is the standard commit message by stone_checksums < 1.0.10;
14
+ # stone_checksums >= 1.0.10 generates chore(checksums): 🔒️ update checksums for v.
@@ -41,7 +41,7 @@ jobs:
41
41
  {KJ|CI:OS_MATRIX_ENTRIES}
42
42
 
43
43
  steps:
44
- - name: Checkout
44
+ {KJ|CI:MACOS_HARDENING_STEP} - name: Checkout
45
45
  uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
46
46
  with:
47
47
  persist-credentials: false
@@ -19,4 +19,4 @@ jobs:
19
19
  with:
20
20
  persist-credentials: false
21
21
  - name: 'Dependency Review'
22
- uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
22
+ uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1
@@ -31,7 +31,7 @@ jobs:
31
31
  # Steps represent a sequence of tasks that will be executed as part of the job
32
32
  steps:
33
33
  - name: Actions Status Discord
34
- uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0
34
+ uses: sarisia/actions-status-discord@74e2ad0c4e57ca8b9ba6aee75d5a7841497bbb87 # v1.16.1
35
35
  if: always()
36
36
  with:
37
37
  webhook: ${{ secrets.DISCORD_WEBHOOK }}
@@ -0,0 +1,92 @@
1
+ name: Perf comment
2
+
3
+ # Duel's report, as a new comment on the pull request, when Duel says to:
4
+ # always (post), or only when its last comment's status differs from the
5
+ # run's (change), so the latest comment is never stale. It never edits or
6
+ # deletes a comment, but hides Duel's earlier ones as outdated, so the
7
+ # newest is the one in view. It runs once the Perf workflow has, with
8
+ # this repository's own workflow and a token that can write, so a pull
9
+ # request from a fork gets a comment too. It checks nothing out and runs
10
+ # none of the pull request's code, only `duel comment` (see Duel's
11
+ # docs/ci.md), which trusts only what the Duel job could have said in
12
+ # what it kept: the pull request's number, if it names the pull request
13
+ # the run compared, and the comment and the status, if they're ones Duel
14
+ # says. Its report, a fork's too, is the comment, as Markdown.
15
+ #
16
+ # And when the label that accepts a regression (c.accept_label in
17
+ # .duel.rb) is added to a pull request, or taken off, it runs the Duel
18
+ # job again, which reads the labels as it runs: a run that failed, once
19
+ # the label's added, or one that passed, once it's taken off.
20
+ #
21
+ # (The workflow must be on the default branch before it runs at all.)
22
+ on:
23
+ workflow_run:
24
+ workflows: ["Perf"]
25
+ types: [completed]
26
+ # (This repository's own workflow, as for the comment, with a token
27
+ # that can run a workflow again: it checks nothing out, and runs none
28
+ # of the pull request's code.)
29
+ pull_request_target:
30
+ types: [labeled, unlabeled]
31
+
32
+ permissions: {}
33
+
34
+ jobs:
35
+ comment:
36
+ name: Comment
37
+ if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion != 'cancelled' }}
38
+ runs-on: ubuntu-latest
39
+ permissions:
40
+ actions: read # to get the report from the Perf run
41
+ pull-requests: write # to comment on the pull request with the report
42
+ steps:
43
+ - name: Get the report
44
+ id: report
45
+ continue-on-error: true # there's none when the Duel job failed before comparing
46
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
47
+ with:
48
+ name: duel-report
49
+ path: ${{ runner.temp }}/report
50
+ run-id: ${{ github.event.workflow_run.id }}
51
+ github-token: ${{ github.token }}
52
+ - uses: ruby/setup-ruby@78c62f2208e480ce3d5ae4dfd9b9e181acf48b63 # v1.344.0
53
+ if: steps.report.outcome == 'success'
54
+ with:
55
+ ruby-version: ruby
56
+ # Duel's own code, from RubyGems (none of the pull request's), so a
57
+ # fix to how it comments comes with a release of Duel.
58
+ - name: Comment on the pull request
59
+ if: steps.report.outcome == 'success'
60
+ env:
61
+ GH_TOKEN: ${{ github.token }}
62
+ HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
63
+ run: |
64
+ gem install duel --version '~> 0.1.8' --no-document
65
+ duel comment --report "$RUNNER_TEMP/report" --head "$HEAD_SHA" --marker 'duel'
66
+
67
+ again:
68
+ name: Run Duel again
69
+ if: >-
70
+ github.event_name == 'pull_request_target' && github.event.label.name == 'duel: accept'
71
+ runs-on: ubuntu-latest
72
+ permissions:
73
+ actions: write # to run the Perf workflow's jobs again
74
+ steps:
75
+ - name: Run Duel again
76
+ env:
77
+ GH_TOKEN: ${{ github.token }}
78
+ GH_REPO: ${{ github.repository }}
79
+ HEAD_SHA: ${{ github.event.pull_request.head.sha }}
80
+ ACTION: ${{ github.event.action }}
81
+ run: |
82
+ # The newest Perf run of the pull request's head commit, once it's
83
+ # done (one that's running may have read the labels already).
84
+ id=$(gh run list --workflow "Perf" --event pull_request --commit "$HEAD_SHA" --limit 1 \
85
+ --json databaseId --jq '.[0].databaseId // empty')
86
+ [ -n "$id" ] || exit 0
87
+ gh run watch "$id" --interval 30 > /dev/null || true
88
+ conclusion=$(gh run view "$id" --json conclusion --jq .conclusion)
89
+ case "$ACTION:$conclusion" in
90
+ labeled:failure) gh run rerun "$id" --failed ;;
91
+ unlabeled:success) gh run rerun "$id" ;;
92
+ esac