Skip to content

Commit 5e417ca

Browse files
authored
fix audit running on pull requests not touching dependencies (#5879)
1 parent 8e11d85 commit 5e417ca

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/audit.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Audit
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- yarn.lock
7+
push:
8+
branches: [master]
9+
schedule:
10+
- cron: 0 4 * * *
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
dependencies:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
- uses: ./.github/actions/node/active-lts
22+
- run: yarn audit

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"dependencies:dedupe": "yarn-deduplicate yarn.lock",
1313
"type:doc": "cd docs && yarn && yarn build",
1414
"type:test": "cd docs && yarn && yarn test",
15-
"lint": "node scripts/check_licenses.js && eslint . --max-warnings 0 && yarn audit --groups dependencies",
16-
"lint:fix": "node scripts/check_licenses.js && eslint . --max-warnings 0 --fix && yarn audit",
15+
"lint": "node scripts/check_licenses.js && eslint . --max-warnings 0",
16+
"lint:fix": "node scripts/check_licenses.js && eslint . --max-warnings 0 --fix",
1717
"lint:inspect": "npx @eslint/config-inspector@latest",
1818
"release:proposal": "node scripts/release/proposal",
1919
"services": "node ./scripts/install_plugin_modules && node packages/dd-trace/test/setup/services",

scripts/verify-ci-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ const IGNORED_WORKFLOWS = {
172172
'retry.yml'
173173
],
174174
trigger_pull_request: [
175+
'audit.yml',
175176
'stale.yml'
176177
],
177178
trigger_push: [

0 commit comments

Comments
 (0)