Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
overcommit:
timeout-minutes: 10
runs-on: ubuntu-latest
runs-on: ubuntu-26.04

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
release:
timeout-minutes: 10
runs-on: ubuntu-latest
runs-on: ubuntu-26.04
environment: release

permissions:
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ on:

jobs:
rspec:
name: rspec (${{ matrix.ruby-version }}, ${{ matrix.os }})
timeout-minutes: 15
runs-on: ${{ matrix.os }}-latest
runs-on: ${{ matrix.runner || format('{0}-latest', matrix.os) }}

strategy:
fail-fast: false
Expand All @@ -28,6 +29,14 @@ jobs:
# Any contributor is welcome to fix them and enable the Windows build.
# Please see Issue #836 for more details.
# - windows
include:
- os: ubuntu
runner: ubuntu-26.04
# setup-ruby has no builds of these Rubies for ubuntu-26.04
- { ruby-version: "2.6", os: ubuntu, runner: ubuntu-24.04 }
- { ruby-version: "2.7", os: ubuntu, runner: ubuntu-24.04 }
- { ruby-version: "3.0", os: ubuntu, runner: ubuntu-24.04 }
- { ruby-version: "3.1", os: ubuntu, runner: ubuntu-24.04 }

steps:
- uses: actions/checkout@v4
Expand All @@ -53,7 +62,7 @@ jobs:

finish:
needs: rspec
runs-on: ubuntu-latest
runs-on: ubuntu-26.04

steps:
- name: Finalize code coverage report
Expand Down
4 changes: 3 additions & 1 deletion lib/overcommit/hook_context/helpers/file_modifications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ def amendment?
cmd = Overcommit::Utils.parent_command
return unless cmd

amend_pattern = 'commit(\s.*)?\s--amend(\s|$)'
# POSIX character class rather than `\s`, which macOS git's regex
# library does not support
amend_pattern = 'commit([[:space:]].*)?[[:space:]]--amend([[:space:]]|$)'

# Since the ps command can return invalid byte sequences for commands
# containing unicode characters, we replace the offending characters,
Expand Down
Loading