gotsha 1.2.0 → 1.2.1
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 +7 -2
- data/README.md +1 -1
- data/lib/gotsha/actions/push.rb +2 -13
- data/lib/gotsha/templates/github_action_example.yml +4 -2
- data/lib/gotsha/templates/gitlab_action_example.yml +1 -1
- data/lib/gotsha/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 59819d703031cede0668b5e6c8aca1c7c40878686980409959c317a3ca324167
         | 
| 4 | 
            +
              data.tar.gz: 57a0b4cc088a9e2be2ba8376d7d6245594ed8e80f87840137407167ac7af715a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: fb9be6d111bbebe9ee3cc58e06b1b8efcc00c16a2748aa0ec3e4d717eccb0751d41cd4a50d122b57df79d997992c2f5a764f38f82ccb62e219db1b97c993a535
         | 
| 7 | 
            +
              data.tar.gz: b6160768b55f3383b5d78202b7f11a0f6fdad5b959c7ce77e85727325a033e4fc3971997b87c502cd5e5543bc1ed17509a6229eab888b2ec84d253472ea227e5
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,7 +1,12 @@ | |
| 1 | 
            +
            ## [1.2.1] - 2025-10-30
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            - Enhance pre-generated Github Action and GitLab CI configs
         | 
| 4 | 
            +
            - Always force push Git notes (clear history is not an objective here; we just need a reliable way for the most recent commit notes to get there every time, and since we also use force in fetching, this is an OK approach)
         | 
| 5 | 
            +
             | 
| 1 6 | 
             
            ## [1.2.0] - 2025-10-26
         | 
| 2 7 |  | 
| 3 | 
            -
            -  | 
| 4 | 
            -
            - `gotsha --help` is  | 
| 8 | 
            +
            - Add `gotsha version` (and support `-v` and `--version`)
         | 
| 9 | 
            +
            - `gotsha --help` is now supported too
         | 
| 5 10 | 
             
            - Relax the required TOML version (it does not matter that much here, and some people reported they had issues with the 3 version required)
         | 
| 6 11 | 
             
            - Remove a leftover old GH action example
         | 
| 7 12 |  | 
    
        data/README.md
    CHANGED
    
    | @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            <a href="https://rubygems.org/gems/gotsha"><img src="https://badge.fury.io/rb/gotsha.svg?icon=si%3Arubygems&refresh= | 
| 1 | 
            +
            <a href="https://rubygems.org/gems/gotsha"><img src="https://badge.fury.io/rb/gotsha.svg?icon=si%3Arubygems&refresh=2" /></a>
         | 
| 2 2 | 
             
            # Gotsha — your local testing CI
         | 
| 3 3 | 
             
            Pushing untested commits? Gotsha!
         | 
| 4 4 |  | 
    
        data/lib/gotsha/actions/push.rb
    CHANGED
    
    | @@ -6,23 +6,12 @@ module Gotsha | |
| 6 6 | 
             
                  DESCRIPTION = "pushes Gotsha test results to remote"
         | 
| 7 7 |  | 
| 8 8 | 
             
                  def call
         | 
| 9 | 
            -
                     | 
| 9 | 
            +
                    command = BashCommand.silent_run!("git push --no-verify --force origin refs/notes/gotsha:refs/notes/gotsha")
         | 
| 10 10 |  | 
| 11 | 
            -
                    unless  | 
| 12 | 
            -
                      puts "First push detected, need to run tests one more time..."
         | 
| 13 | 
            -
                      Fetch.new.call
         | 
| 14 | 
            -
                      Test.new.call
         | 
| 15 | 
            -
                      push_command
         | 
| 16 | 
            -
                    end
         | 
| 11 | 
            +
                    raise(Errors::HardFail, "something went wrong") unless command.success?
         | 
| 17 12 |  | 
| 18 13 | 
             
                    "pushed"
         | 
| 19 14 | 
             
                  end
         | 
| 20 | 
            -
             | 
| 21 | 
            -
                  private
         | 
| 22 | 
            -
             | 
| 23 | 
            -
                  def push_command
         | 
| 24 | 
            -
                    BashCommand.silent_run!("git push --no-verify origin refs/notes/gotsha:refs/notes/gotsha")
         | 
| 25 | 
            -
                  end
         | 
| 26 15 | 
             
                end
         | 
| 27 16 | 
             
              end
         | 
| 28 17 | 
             
            end
         | 
| @@ -2,11 +2,13 @@ name: Gotsha | |
| 2 2 |  | 
| 3 3 | 
             
            on:
         | 
| 4 4 | 
             
              pull_request:
         | 
| 5 | 
            -
                 | 
| 6 | 
            -
                # types: [ready_for_review]
         | 
| 5 | 
            +
                types: [opened, ready_for_review, synchronize]
         | 
| 7 6 |  | 
| 8 7 | 
             
            jobs:
         | 
| 9 8 | 
             
              verify:
         | 
| 9 | 
            +
                # Uncomment line below to run Gotsha only after asking for review (ie. do not run when PR is draft)
         | 
| 10 | 
            +
                #if: github.event.action == 'ready_for_review' || (github.event.action == 'synchronize' && !github.event.pull_request.draft)
         | 
| 11 | 
            +
             | 
| 10 12 | 
             
                runs-on: ubuntu-latest
         | 
| 11 13 | 
             
                steps:
         | 
| 12 14 | 
             
                  - uses: actions/checkout@v4
         | 
    
        data/lib/gotsha/version.rb
    CHANGED