Skip to content

Commit 017043d

Browse files
authored
Generate in repo (#480)
1 parent a68b363 commit 017043d

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ jobs:
3737
with:
3838
path: ~/.cache/pre-commit
3939
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
40-
- name: Run pre-commit
40+
- id: pre_commit
41+
name: Run pre-commit
4142
if: github.event.action != 'closed' && github.event.pull_request.merged != true
4243
run: |
43-
pre-commit run --hook-stage=manual generate --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }} --show-diff-on-failure --color=always
44+
pre-commit run --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }} --show-diff-on-failure --color=always
4445
- name: Commit changes
4546
if: ${{ failure() }}
4647
run: |-

.pre-commit-config.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
repos:
22
- repo: local
33
hooks:
4-
- id: generated
5-
name: Do not commit generated files
6-
language: fail
7-
entry: Unstage generated files with 'git reset --' command
8-
files: "^packages/datadog-api-client-v[1-9].*"
9-
verbose: true
10-
- id: generated-features
11-
name: Do not commit generated feature files
12-
language: fail
13-
entry: Unstage generated files with 'git reset --' command
14-
files: "^features/v[1-9][0-9]*/.*.feature$"
15-
verbose: true
164
- id: generate
175
name: Generate
186
language: node
197
entry: make
20-
files: "^.generator/.*"
8+
files: '^(\.generator/.*|\.pre-commit-config\.yaml|package\.json|yarn\.lock|\.eslintrc\.js|Makefile)'
219
pass_filenames: false
2210
- id: lint
2311
name: Lint

0 commit comments

Comments
 (0)