Skip to content

Commit f932fed

Browse files
committed
commit from snyk
1 parent 2ec28c2 commit f932fed

File tree

4 files changed

+90
-19
lines changed

4 files changed

+90
-19
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
name: ci
22
on:
3+
workflow_run:
4+
workflows: ['snyk']
5+
types:
6+
- completed
7+
branches:
8+
- snyk-fix-*
9+
- snyk-upgrade-*
310
push:
411
branches:
512
- main
@@ -11,8 +18,9 @@ on:
1118

1219
jobs:
1320
build:
14-
name: "build"
21+
name: 'build'
1522
runs-on: ubuntu-latest
23+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'snyk-')) }}
1624
steps:
1725
- name: checkout
1826
uses: actions/checkout@v4
@@ -22,11 +30,11 @@ jobs:
2230
enable_npm: true
2331
enable_go: true
2432
enable_cue: true
25-
cue_version: "v0.12.0"
33+
cue_version: 'v0.12.0'
2634
- name: install percli
2735
uses: perses/cli-actions/actions/[email protected]
2836
with:
29-
cli-version: "v0.51.1"
37+
cli-version: 'v0.51.1'
3038
- name: cache cue deps
3139
uses: actions/cache@v4
3240
with:
@@ -52,8 +60,9 @@ jobs:
5260
!node_modules
5361
5462
lint-npm:
55-
name: "lint-npm"
63+
name: 'lint-npm'
5664
runs-on: ubuntu-latest
65+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'snyk-')) }}
5766
steps:
5867
- name: checkout
5968
uses: actions/checkout@v4
@@ -65,8 +74,9 @@ jobs:
6574
- run: npm run lint
6675

6776
test-npm:
68-
name: "test-npm"
77+
name: 'test-npm'
6978
runs-on: ubuntu-latest
79+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'snyk-')) }}
7080
steps:
7181
- name: checkout
7282
uses: actions/checkout@v4
@@ -78,8 +88,9 @@ jobs:
7888
- run: npm run test
7989

8090
type-check:
81-
name: "type-check"
91+
name: 'type-check'
8292
runs-on: ubuntu-latest
93+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'snyk-')) }}
8394
steps:
8495
- name: checkout
8596
uses: actions/checkout@v4
@@ -91,8 +102,9 @@ jobs:
91102
- run: npm run type-check
92103

93104
lint-schemas:
94-
name: "Validate plugin schemas"
105+
name: 'Validate plugin schemas'
95106
runs-on: ubuntu-latest
107+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'snyk-')) }}
96108
steps:
97109
- name: checkout
98110
uses: actions/checkout@v4
@@ -101,11 +113,11 @@ jobs:
101113
with:
102114
enable_go: true
103115
enable_cue: true
104-
cue_version: "v0.12.0"
116+
cue_version: 'v0.12.0'
105117
- name: Install percli
106118
uses: perses/cli-actions/actions/[email protected]
107119
with:
108-
cli-version: "v0.51.1"
120+
cli-version: 'v0.51.1'
109121
- uses: actions/cache@v4
110122
id: cache
111123
with:
@@ -117,6 +129,7 @@ jobs:
117129
golangci:
118130
name: lint
119131
runs-on: ubuntu-latest
132+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'snyk-')) }}
120133
steps:
121134
- name: checkout
122135
uses: actions/checkout@v4
@@ -133,8 +146,9 @@ jobs:
133146
version: v2.3.0
134147
- run: make golangci-lint
135148
module-check:
136-
name: "Check plugin modules"
149+
name: 'Check plugin modules'
137150
runs-on: ubuntu-latest
151+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'snyk-')) }}
138152
steps:
139153
- name: checkout
140154
uses: actions/checkout@v4
@@ -143,7 +157,7 @@ jobs:
143157
with:
144158
enable_go: true
145159
enable_cue: true
146-
cue_version: "v0.12.0"
160+
cue_version: 'v0.12.0'
147161
- uses: actions/cache@v4
148162
id: cache
149163
with:
@@ -157,8 +171,8 @@ jobs:
157171
run: git diff --exit-code -- */cue.mod
158172

159173
release:
160-
name: "release"
161-
needs: "build"
174+
name: 'release'
175+
needs: 'build'
162176
runs-on: ubuntu-latest
163177
permissions:
164178
contents: write
@@ -174,8 +188,8 @@ jobs:
174188
enable_npm: true
175189
enable_go: true
176190
enable_cue: true
177-
cue_version: "v0.12.0"
178-
nvmrc_path: "./.nvmrc"
191+
cue_version: 'v0.12.0'
192+
nvmrc_path: './.nvmrc'
179193
- name: Download archive
180194
uses: actions/download-artifact@v4
181195
with:

.github/workflows/doc.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
name: doc
22
on:
3+
workflow_run:
4+
workflows: ['snyk']
5+
types:
6+
- completed
7+
branches:
8+
- snyk-fix-*
9+
- snyk-upgrade-*
310
push:
411
branches:
512
- main
@@ -12,8 +19,9 @@ on:
1219

1320
jobs:
1421
docs-fmt:
15-
name: "Check docs format"
22+
name: 'Check docs format'
1623
runs-on: ubuntu-latest
24+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'snyk-')) }}
1725
steps:
1826
- name: checkout
1927
uses: actions/checkout@v4
@@ -25,5 +33,3 @@ jobs:
2533
run: go install github.com/bwplotka/mdox@latest
2634
- name: check docs
2735
run: make checkdocs
28-
29-

.github/workflows/snyk.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: snyk
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
merge_group:
7+
8+
jobs:
9+
lockfile-update:
10+
name: 'regenerate lockfile'
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
if: startsWith(github.head_ref, 'snyk-')
15+
outputs:
16+
lockfile-updated: ${{ steps.lockfile-changes.outputs.has_changes }}
17+
steps:
18+
- name: checkout
19+
uses: actions/checkout@v4
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
ref: ${{ github.head_ref }}
23+
24+
- uses: perses/[email protected]
25+
- uses: ./.github/perses-ci/actions/setup_environment
26+
with:
27+
enable_npm: true
28+
- name: install dependencies
29+
run: npm install
30+
31+
- name: check for lockfile changes
32+
id: lockfile-changes
33+
run: |
34+
if git diff --quiet package-lock.json; then
35+
echo "has_changes=false" >> $GITHUB_OUTPUT
36+
else
37+
echo "has_changes=true" >> $GITHUB_OUTPUT
38+
fi
39+
40+
- name: Get last commit message
41+
id: last-commit
42+
run: |
43+
echo "message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
44+
45+
- uses: stefanzweifel/git-auto-commit-action@v6
46+
if: steps.lockfile-changes.outputs.has_changes == 'true'
47+
with:
48+
commit_message: '[IGNORE] ${{ steps.last-commit.outputs.message }}'
49+
file_pattern: 'package-lock.json'
50+
commit_options: '--no-verify --signoff --amend'
51+
push_options: '--force-with-lease'

tempo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"dependencies": {
2727
"@codemirror/autocomplete": "^6.18.4",
2828
"@lezer/highlight": "^1.2.1x",
29-
"@grafana/lezer-traceql": "^0.0.20"
29+
"@grafana/lezer-traceql": "^0.0.22"
3030
},
3131
"peerDependencies": {
3232
"@emotion/react": "^11.7.1",

0 commit comments

Comments
 (0)