kettle-dev 2.3.9 → 2.3.11
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +45 -1
- data/LICENSE.md +1 -1
- data/README.md +7 -5
- data/exe/kettle-gha-sha-pins +5 -31
- data/lib/kettle/dev/ci_helpers.rb +30 -8
- data/lib/kettle/dev/ci_monitor.rb +1 -1
- data/lib/kettle/dev/gha_sha_pins_cli.rb +12 -1357
- data/lib/kettle/dev/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +27 -7
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e30ac2b82038eea94426435c99852b725d70fab0838aeaf8ab43728305a11bb2
|
|
4
|
+
data.tar.gz: 02e8ab6c76c1d443fa5f00c184d452fd6d2b4bfc44bd425a572e948ce76b9d0d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bfebbbb3262abd7998ab3ec508b2235ce6df8c560839a8d4e63acfbe19534ccf975bed2d0f4afe32dd72bd910d5f0a795802b43f47d4442b63801555c6f7ec15
|
|
7
|
+
data.tar.gz: 11e0ea51634549b3d1676926ea6e5abb2c5bc363de47f6e8b6c811f69e88e17253bebbaaa6f4ba5dfbfc1a527e3e61f6950db686990e0c8b90b0c5ade5c20158
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,46 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [2.3.11] - 2026-07-23
|
|
34
|
+
|
|
35
|
+
- TAG: [v2.3.11][2.3.11t]
|
|
36
|
+
- COVERAGE: 92.17% -- 3791/4113 lines in 37 files
|
|
37
|
+
- BRANCH COVERAGE: 75.80% -- 1500/1979 branches in 37 files
|
|
38
|
+
- 59.51% documented
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- GitHub Actions release monitoring now falls back to repository-level workflow
|
|
43
|
+
runs when a per-workflow endpoint lags for the pushed HEAD, and waits up to
|
|
44
|
+
five minutes by default for workflows to appear.
|
|
45
|
+
|
|
46
|
+
## [2.3.10] - 2026-07-23
|
|
47
|
+
|
|
48
|
+
- TAG: [v2.3.10][2.3.10t]
|
|
49
|
+
- COVERAGE: 92.35% -- 3790/4104 lines in 37 files
|
|
50
|
+
- BRANCH COVERAGE: 75.95% -- 1500/1975 branches in 37 files
|
|
51
|
+
- 60.00% documented
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- Local development tooling now uses `kettle-gha-pins` 0.2.0 or newer on
|
|
56
|
+
Ruby 3.2+, while keeping older supported Ruby bundles solvable.
|
|
57
|
+
- `kettle-gha-sha-pins` now delegates GitHub Actions release-tag parsing,
|
|
58
|
+
canonicalization, cache persistence, GitHub release/tag/commit resolution,
|
|
59
|
+
and upgrade-target selection to the shared
|
|
60
|
+
`kettle-gha-pins` gem.
|
|
61
|
+
- `kettle-gha-sha-pins` is now a compatibility wrapper around the
|
|
62
|
+
`kettle-gha-pins` executable.
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- Restored `kettle-gha-pins` as a normal runtime dependency now that 0.2.1
|
|
67
|
+
supports the full `kettle-dev` Ruby floor.
|
|
68
|
+
|
|
69
|
+
- Appraisal rake task specs now rely on kettle-test's `silent_stream`
|
|
70
|
+
integration instead of stubbing `Object#warn`, which is not supported under
|
|
71
|
+
JRuby 9.4.
|
|
72
|
+
|
|
33
73
|
## [2.3.9] - 2026-07-21
|
|
34
74
|
|
|
35
75
|
- TAG: [v2.3.9][2.3.9t]
|
|
@@ -2586,7 +2626,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
2586
2626
|
- Selecting will run the selected workflow via `act`
|
|
2587
2627
|
- This may move to its own gem in the future.
|
|
2588
2628
|
|
|
2589
|
-
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.3.
|
|
2629
|
+
[Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.3.11...HEAD
|
|
2630
|
+
[2.3.11]: https://github.com/kettle-dev/kettle-dev/compare/v2.3.10...v2.3.11
|
|
2631
|
+
[2.3.11t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.3.11
|
|
2632
|
+
[2.3.10]: https://github.com/kettle-dev/kettle-dev/compare/v2.3.9...v2.3.10
|
|
2633
|
+
[2.3.10t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.3.10
|
|
2590
2634
|
[2.3.9]: https://github.com/kettle-dev/kettle-dev/compare/v2.3.8...v2.3.9
|
|
2591
2635
|
[2.3.9t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.3.9
|
|
2592
2636
|
[2.3.8]: https://github.com/kettle-dev/kettle-dev/compare/v2.3.7...v2.3.8
|
data/LICENSE.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This project is made available under the following license.
|
|
4
4
|
Choose the option that best fits your use case:
|
|
5
5
|
|
|
6
|
-
- [AGPL-3.0-only](AGPL-3.0-only.md)
|
|
6
|
+
- [AGPL-3.0-only](https://github.com/kettle-dev/kettle-dev/blob/main/AGPL-3.0-only.md)
|
|
7
7
|
|
|
8
8
|
If none of the above licenses fit your use case, please [contact us](mailto:floss@galtzo.com) to discuss a custom commercial license.
|
|
9
9
|
|
data/README.md
CHANGED
|
@@ -94,7 +94,7 @@ bin/kettle-release
|
|
|
94
94
|
| Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎ruby-3.0-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎ruby-3.1-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎ruby-3.2-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎ruby-3.3-wf] [![Ruby 3.4 Compat][💎ruby-3.4i]][🚎ruby-3.4-wf]|
|
|
95
95
|
| Works with MRI Ruby 2 | [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎ruby-2.4-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎ruby-2.5-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎ruby-2.6-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎ruby-2.7-wf]|
|
|
96
96
|
| Support & Community | [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![Get help from RubyForum][✉️ruby-forum-img]][✉️ruby-forum] [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork] [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor] |
|
|
97
|
-
| Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on
|
|
97
|
+
| Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on GitHub.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] |
|
|
98
98
|
| Documentation | [![Current release on RubyDoc.info][📜docs-cr-rd-img]][🚎yard-current] [![YARD on Galtzo.com][📜docs-head-rd-img]][🚎yard-head] [![Maintainer Blog][🚂maint-blog-img]][🚂maint-blog] [![GitLab Wiki][📜gl-wiki-img]][📜gl-wiki] [![GitHub Wiki][📜gh-wiki-img]][📜gh-wiki] |
|
|
99
99
|
| Compliance | [![License: AGPL-3.0-only][📄license-img]][📄license] [![Apache license compatibility: Category X][📄license-compat-img]][📄license-compat] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] |
|
|
100
100
|
| Style | [![Enforced Code Style Linter][💎rlts-img]][💎rlts] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] [![Compatibility appraised by: appraisal2][💎appraisal2-img]][💎appraisal2] |
|
|
@@ -470,6 +470,8 @@ What it does:
|
|
|
470
470
|
### Pre-release checks
|
|
471
471
|
|
|
472
472
|
- Script: `exe/kettle-gha-sha-pins` (run as `kettle-gha-sha-pins`)
|
|
473
|
+
- New projects should install `kettle-gha-pins` and run `kettle-gha-pins`
|
|
474
|
+
directly; this `kettle-dev` command remains as a compatibility wrapper.
|
|
473
475
|
- Purpose: Validate and optionally update GitHub Actions `uses:` refs to pinned
|
|
474
476
|
SHAs and current allowed release versions.
|
|
475
477
|
- Usage:
|
|
@@ -664,7 +666,7 @@ See [CHANGELOG.md][📌changelog] for a list of releases.
|
|
|
664
666
|
|
|
665
667
|
## 📄 License
|
|
666
668
|
|
|
667
|
-
The gem is available under the following license: [AGPL-3.0-only](AGPL-3.0-only.md).
|
|
669
|
+
The gem is available under the following license: [AGPL-3.0-only](https://github.com/kettle-dev/kettle-dev/blob/main/AGPL-3.0-only.md).
|
|
668
670
|
See [LICENSE.md][📄license] for details.
|
|
669
671
|
|
|
670
672
|
If none of the available licenses suit your use case, please [contact us](mailto:floss@galtzo.com) to discuss a custom commercial license.
|
|
@@ -781,7 +783,7 @@ Thanks for RTFM. ☺️
|
|
|
781
783
|
[📜src-gl]: https://gitlab.com/kettle-dev/kettle-dev
|
|
782
784
|
[📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue
|
|
783
785
|
[📜src-cb]: https://codeberg.org/kettle-dev/kettle-dev
|
|
784
|
-
[📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=
|
|
786
|
+
[📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=GitHub&logoColor=green
|
|
785
787
|
[📜src-gh]: https://github.com/kettle-dev/kettle-dev
|
|
786
788
|
[📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
|
787
789
|
[📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
|
@@ -889,12 +891,12 @@ Thanks for RTFM. ☺️
|
|
|
889
891
|
[📌gitmoji]: https://gitmoji.dev
|
|
890
892
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
891
893
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
892
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-4.
|
|
894
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-4.113-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
893
895
|
[🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
|
|
894
896
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
895
897
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
896
898
|
[📄license]: LICENSE.md
|
|
897
|
-
[📄license-ref]: AGPL-3.0-only.md
|
|
899
|
+
[📄license-ref]: https://github.com/kettle-dev/kettle-dev/blob/main/AGPL-3.0-only.md
|
|
898
900
|
[📄license-img]: https://img.shields.io/badge/License-AGPL--3.0--only-259D6C.svg
|
|
899
901
|
[📄license-compat]: https://www.apache.org/legal/resolved.html#category-x
|
|
900
902
|
[📄license-compat-img]: https://img.shields.io/badge/Apache_Incompatible:_Category_X-%E2%9C%97-C0392B.svg?style=flat&logo=Apache
|
data/exe/kettle-gha-sha-pins
CHANGED
|
@@ -3,38 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
# vim: set syntax=ruby
|
|
5
5
|
|
|
6
|
-
$stdout.sync = true
|
|
7
|
-
$stderr.sync = true
|
|
8
|
-
|
|
9
|
-
# Do not rely on Bundler; allow running in repos that do not depend on kettle-dev
|
|
10
|
-
begin
|
|
11
|
-
require "rubygems"
|
|
12
|
-
rescue LoadError
|
|
13
|
-
# Older Rubies always have rubygems; continue anyway
|
|
14
|
-
end
|
|
15
|
-
|
|
16
6
|
script_basename = File.basename(__FILE__)
|
|
17
7
|
|
|
18
8
|
begin
|
|
19
|
-
|
|
20
|
-
rescue LoadError
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
require "kettle/dev"
|
|
25
|
-
rescue LoadError => e
|
|
26
|
-
warn("#{script_basename}: could not load dependency: #{e.class}: #{e.message}")
|
|
27
|
-
warn("Hint: Install the kettle-dev gem (`gem install kettle-dev`) or add it to your Gemfile. Bundler is not required for this script.")
|
|
28
|
-
exit(1)
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
begin
|
|
33
|
-
cli = Kettle::Dev::GhaShaPinsCLI.new(ARGV)
|
|
34
|
-
status = cli.run!
|
|
35
|
-
Kettle::Dev::ExitAdapter.exit(status)
|
|
36
|
-
rescue => e
|
|
37
|
-
warn("#{script_basename}: unexpected error: #{e.class}: #{e.message}")
|
|
38
|
-
warn(e.backtrace.join("\n"))
|
|
39
|
-
Kettle::Dev::ExitAdapter.exit(1)
|
|
9
|
+
Kernel.exec(Gem.ruby, Gem.bin_path("kettle-gha-pins", "kettle-gha-pins"), *ARGV)
|
|
10
|
+
rescue Gem::Exception, LoadError => e
|
|
11
|
+
warn("#{script_basename}: could not load kettle-gha-pins executable: #{e.class}: #{e.message}")
|
|
12
|
+
warn("Hint: Install the kettle-gha-pins gem (`gem install kettle-gha-pins`) or add it to your Gemfile.")
|
|
13
|
+
exit(1)
|
|
40
14
|
end
|
|
@@ -97,19 +97,17 @@ module Kettle
|
|
|
97
97
|
|
|
98
98
|
# Scope to the exact commit SHA when available to avoid picking up a previous run on the same branch.
|
|
99
99
|
sha = head_sha || current_head_sha
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
|
|
106
|
-
return unless res.is_a?(Net::HTTPSuccess)
|
|
100
|
+
data = github_get_json(
|
|
101
|
+
"https://api.github.com/repos/#{owner}/#{repo}/actions/workflows/#{workflow_file}/runs?branch=#{URI.encode_www_form_component(b)}&per_page=5",
|
|
102
|
+
token: token
|
|
103
|
+
)
|
|
104
|
+
return unless data
|
|
107
105
|
|
|
108
|
-
data = JSON.parse(res.body)
|
|
109
106
|
runs = Array(data["workflow_runs"]) || []
|
|
110
107
|
# Try to match by head_sha first; fall back to first run (branch-scoped) if none matches yet.
|
|
111
108
|
run = if sha
|
|
112
109
|
match = runs.find { |r| r["head_sha"] == sha }
|
|
110
|
+
match ||= latest_repository_workflow_run(owner: owner, repo: repo, workflow_file: workflow_file, branch: b, head_sha: sha, token: token)
|
|
113
111
|
require_head ? match : (match || runs.first)
|
|
114
112
|
else
|
|
115
113
|
runs.first unless require_head
|
|
@@ -128,6 +126,30 @@ module Kettle
|
|
|
128
126
|
nil
|
|
129
127
|
end
|
|
130
128
|
|
|
129
|
+
def latest_repository_workflow_run(owner:, repo:, workflow_file:, branch:, head_sha:, token:)
|
|
130
|
+
data = github_get_json(
|
|
131
|
+
"https://api.github.com/repos/#{owner}/#{repo}/actions/runs?branch=#{URI.encode_www_form_component(branch)}&per_page=100",
|
|
132
|
+
token: token
|
|
133
|
+
)
|
|
134
|
+
return unless data
|
|
135
|
+
|
|
136
|
+
workflow_path = ".github/workflows/#{workflow_file}"
|
|
137
|
+
Array(data["workflow_runs"]).find do |run|
|
|
138
|
+
run["head_sha"] == head_sha && run["path"] == workflow_path
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
def github_get_json(url, token:)
|
|
143
|
+
uri = URI(url)
|
|
144
|
+
req = Net::HTTP::Get.new(uri)
|
|
145
|
+
req["User-Agent"] = "kettle-dev/ci-helpers"
|
|
146
|
+
req["Authorization"] = "token #{token}" if token && !token.empty?
|
|
147
|
+
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
|
|
148
|
+
return unless res.is_a?(Net::HTTPSuccess)
|
|
149
|
+
|
|
150
|
+
JSON.parse(res.body)
|
|
151
|
+
end
|
|
152
|
+
|
|
131
153
|
# Whether a run has completed successfully.
|
|
132
154
|
# @param run [Hash, nil]
|
|
133
155
|
# @return [Boolean]
|