Skip to content

Commit

Permalink
github-actions(pre-commit): detect merge conflicts and shebangs (#15319
Browse files Browse the repository at this point in the history
…) (#15327)

(cherry picked from commit ab03846)

Co-authored-by: Victor Martinez <[email protected]>
  • Loading branch information
mergify[bot] and v1v authored Jan 22, 2025
1 parent 7189c56 commit e7cb4eb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: pre-commit

on:
pull_request:
push:
branches:
- main
- 7.*
- 8.*
- 9.*

permissions:
contents: read

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: elastic/oblt-actions/pre-commit@v1
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
args: ['--assume-in-merge']

0 comments on commit e7cb4eb

Please sign in to comment.