gotsha 0.2.2 → 0.2.4
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
- data/CHANGELOG.md +9 -0
- data/lib/gotsha/action_dispatcher.rb +4 -1
- data/lib/gotsha/actions/uninstall.rb +2 -2
- data/lib/gotsha/templates/github_action_example.yml +9 -26
- data/lib/gotsha/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10fb8a6db8218b332233ac4ad14b6c624492b8f2fb98b4119464b499a70a554a
|
4
|
+
data.tar.gz: 2e1bbd995e94b0e48a235f473afd6fa968a6e859c23bbcfdef02fa7ce241f03a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8241e21611a88f26e29ac8fa1c7170367adb76ed330520f0667f53d6647f478b5513c1c32946c4eb581644864e812c40aaaec2587015a7ee8911ae93d5c2ed76
|
7
|
+
data.tar.gz: 1a0d90f0de82ba6fedc88422896b011140ff074babeff155f5c57f993d754fb53b05654564a452d956fd8fa702d5aa9271d0622477b6c48f6e93fedbc665d50e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [0.2.4] - 2025-10-14
|
2
|
+
|
3
|
+
- Change Github Action config to actually use the gem itself (instead of bash scripting the logic)
|
4
|
+
|
5
|
+
## [0.2.3] - 2025-10-14
|
6
|
+
|
7
|
+
- Add support for running on CI (ENV var GOTSHA_CI)
|
8
|
+
- Fix changelog link
|
9
|
+
|
1
10
|
## [0.2.2] - 2025-10-13
|
2
11
|
|
3
12
|
- Fix to ensure everything works on Mac as well
|
@@ -5,6 +5,7 @@ module Gotsha
|
|
5
5
|
INIT_SETUP_ACTION = "init"
|
6
6
|
DEFAULT_ACTION = "help"
|
7
7
|
OPEN_CONFIG_ACTION = "configure"
|
8
|
+
UNINSTALL_ACTION = "uninstall"
|
8
9
|
|
9
10
|
def self.call(action_name = DEFAULT_ACTION)
|
10
11
|
action_name ||= DEFAULT_ACTION
|
@@ -25,7 +26,9 @@ module Gotsha
|
|
25
26
|
attr_reader :action_name
|
26
27
|
|
27
28
|
def verify_configuration!
|
28
|
-
return if
|
29
|
+
return if UserConfig.get(:ci)
|
30
|
+
|
31
|
+
return if [INIT_SETUP_ACTION, UNINSTALL_ACTION].include?(action_name.to_s)
|
29
32
|
|
30
33
|
raise(Errors::HardFail, "config files not found, please run `gotsha init` first") if UserConfig.blank?
|
31
34
|
|
@@ -8,8 +8,8 @@ module Gotsha
|
|
8
8
|
def call
|
9
9
|
puts "Removing config files..."
|
10
10
|
|
11
|
-
FileUtils.rm_rf(Config::CONFIG_DIR)
|
12
|
-
FileUtils.rm(Config::GH_CONFIG_FILE)
|
11
|
+
File.exist?(Config::CONFIG_DIR) && FileUtils.rm_rf(Config::CONFIG_DIR)
|
12
|
+
File.exist?(Config::GH_CONFIG_FILE) && FileUtils.rm(Config::GH_CONFIG_FILE)
|
13
13
|
|
14
14
|
puts "Unsetting Git hooks path..."
|
15
15
|
BashCommand.silent_run!("git config --unset core.hooksPath")
|
@@ -12,33 +12,16 @@ jobs:
|
|
12
12
|
fetch-depth: 0
|
13
13
|
ref: ${{ github.event.pull_request.head.sha }}
|
14
14
|
|
15
|
+
- uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: '3.3'
|
18
|
+
bundler-cache: true
|
19
|
+
|
20
|
+
- name: Install Gotsha
|
21
|
+
run: gem install gotsha
|
22
|
+
|
15
23
|
- name: Fetch Gotsha notes
|
16
24
|
run: git fetch origin 'refs/notes/gotsha:refs/notes/gotsha'
|
17
25
|
|
18
26
|
- name: Show tests output
|
19
|
-
run:
|
20
|
-
SHA="${{ github.event.pull_request.head.sha }}"
|
21
|
-
if git --no-pager notes --ref=gotsha show "$SHA" >/dev/null 2>&1; then
|
22
|
-
git --no-pager notes --ref=gotsha show "$SHA"
|
23
|
-
else
|
24
|
-
echo "No gotsha note found for $SHA"
|
25
|
-
fi
|
26
|
-
|
27
|
-
- name: Verify
|
28
|
-
run: |
|
29
|
-
SHA="${{ github.event.pull_request.head.sha }}"
|
30
|
-
NOTE="$(git --no-pager notes --ref=gotsha show "$SHA" 2>/dev/null || true)"
|
31
|
-
|
32
|
-
if [ -z "$NOTE" ]; then
|
33
|
-
echo "::error ::Gotsha: not verified yet. Run 'gotsha commit' to verify."
|
34
|
-
exit 1
|
35
|
-
elif [[ "$NOTE" == Tests\ failed:* ]]; then
|
36
|
-
git --no-pager notes --ref=gotsha show "$SHA"
|
37
|
-
echo "::error ::Gotsha: Tests failed"
|
38
|
-
exit 1
|
39
|
-
elif [[ "$NOTE" == Tests\ passed:* ]]; then
|
40
|
-
echo "✓ Gotsha: tests passed"
|
41
|
-
else
|
42
|
-
echo "::error ::Unrecognized Gotsha note format for $SHA"
|
43
|
-
exit 1
|
44
|
-
fi
|
27
|
+
run: GOTSHA_CI=1 gotsha show
|
data/lib/gotsha/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gotsha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vitek Meloun
|
@@ -74,7 +74,7 @@ licenses:
|
|
74
74
|
metadata:
|
75
75
|
homepage_uri: https://www.gotsha.org/
|
76
76
|
source_code_uri: https://github.com/melounvitek/gotsha
|
77
|
-
changelog_uri: https://github.com/melounvitek/gotsha
|
77
|
+
changelog_uri: https://github.com/melounvitek/gotsha/blob/master/CHANGELOG.md
|
78
78
|
rdoc_options: []
|
79
79
|
require_paths:
|
80
80
|
- lib
|