Skip to content

Commit aa68137

Browse files
authored
github-actions(pre-commit): detect merge conflicts and shebangs (#4778)
1 parent 3f0b17d commit aa68137

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/pre-commit.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- 7.*
9+
- 8.*
10+
- 9.*
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
pre-commit:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: elastic/oblt-actions/pre-commit@v1

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.6.0
4+
hooks:
5+
- id: check-executables-have-shebangs
6+
- id: check-shebang-scripts-are-executable
7+
- id: check-merge-conflict
8+
args: ['--assume-in-merge']

0 commit comments

Comments
 (0)