Skip to content

Commit 601dc9f

Browse files
chore: install pre_commit as a dev requirement (#886)
* chore: install pre_commit as a dev requirement * chore: pre_commit hook pkg updates and dev requirements * fix: cleanup old lock file Signed-off-by: Kevin Carter <[email protected]> * fix: remove duplicate yaml Signed-off-by: Kevin Carter <[email protected]> * fix: yamllint indentation add notifications Signed-off-by: Kevin Carter <[email protected]> --------- Signed-off-by: Kevin Carter <[email protected]> Co-authored-by: Kevin Carter <[email protected]>
1 parent 1880f39 commit 601dc9f

File tree

8 files changed

+53
-31
lines changed

8 files changed

+53
-31
lines changed

.ansible/.lock

Whitespace-only changes.
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on: pull_request_target
2+
3+
jobs:
4+
welcome:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/github-script@v7
8+
with:
9+
script: |
10+
// Get a list of all issues created by the PR opener
11+
// See: https://octokit.github.io/rest.js/#pagination
12+
const creator = context.payload.sender.login
13+
const opts = github.rest.issues.listForRepo.endpoint.merge({
14+
...context.issue,
15+
creator,
16+
state: 'all'
17+
})
18+
const issues = await github.paginate(opts)
19+
20+
for (const issue of issues) {
21+
if (issue.number === context.issue.number) {
22+
continue
23+
}
24+
25+
if (issue.pull_request) {
26+
return // Creator is already a contributor.
27+
}
28+
}
29+
30+
await github.rest.issues.createComment({
31+
issue_number: context.issue.number,
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
body: `**Welcome**, new contributor!
35+
36+
Please make sure you've read our [contributing guide](CONTRIBUTING.md) and we look forward to reviewing your Pull request shortly ✨`
37+
})

.github/workflows/pre-commit.yaml

+2-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Run pull-request syntax workflows
22
on:
33
- pull_request
4+
45
jobs:
56
pre_commit:
67
runs-on: ubuntu-latest
@@ -19,21 +20,8 @@ jobs:
1920
id: changed-files
2021
uses: tj-actions/[email protected]
2122
- name: Run Check
22-
uses: pre-commit/[email protected].0
23+
uses: pre-commit/[email protected].1
2324
with:
2425
extra_args: >-
2526
--files ${{ steps.changed-files.outputs.all_changed_files }}
2627
--hook-stage manual
27-
28-
- name: Checks failed, notification
29-
if: failure()
30-
run: |
31-
echo "Tests Failed"
32-
echo "Run the following command to identify issues"
33-
echo "pre-commit run --files ${{ steps.changed-files.outputs.all_changed_files }}"
34-
- name: Upload log artifacts on failure
35-
if: failure()
36-
uses: actions/upload-artifact@v4
37-
with:
38-
name: pre-commit-py${{ matrix.python-version }}
39-
path: /home/runner/.cache/pre-commit/pre-commit.log

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repos:
1919
stages:
2020
- commit-msg
2121
- repo: https://github.com/pre-commit/pre-commit-hooks
22-
rev: v4.5.0
22+
rev: v5.0.0
2323
hooks:
2424
- id: end-of-file-fixer
2525
stages:
@@ -51,13 +51,13 @@ repos:
5151
- "--unsafe"
5252
- id: debug-statements
5353
- repo: https://github.com/psf/black
54-
rev: 24.1.1
54+
rev: 25.1.0
5555
hooks:
5656
- id: black
5757
stages:
5858
- manual
5959
- repo: https://github.com/adrienverge/yamllint.git
60-
rev: v1.29.0
60+
rev: v1.35.1
6161
hooks:
6262
- id: yamllint
6363
stages:
@@ -67,7 +67,7 @@ repos:
6767
-d {extends: default, rules: {line-length: disable},
6868
ignore: [submodules/]}
6969
- repo: https://github.com/ansible-community/ansible-lint
70-
rev: v6.22.2
70+
rev: v24.9.2
7171
hooks:
7272
- id: ansible-lint
7373
stages:

base-helm-configs/octavia/octavia-helm-overrides.yaml

+8-10
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ conf:
7575
auth_type: password
7676
auth_version: v3
7777
memcache_security_strategy: ENCRYPT
78-
service_token_roles: service
79-
service_token_roles_required: true
8078
service_type: load-balancer
8179
valid_interfaces: internal
8280
neutron:
@@ -178,20 +176,20 @@ pod:
178176
init_container: null
179177
octavia_api:
180178
volumeMounts:
181-
- name: pod-run-octavia
182-
mountPath: /var/run/octavia
179+
- name: pod-run-octavia
180+
mountPath: /var/run/octavia
183181
volumes:
184-
- name: pod-run-octavia
185-
emptyDir: {}
182+
- name: pod-run-octavia
183+
emptyDir: {}
186184
octavia_worker:
187185
init_container: null
188186
octavia_worker:
189187
volumeMounts:
190-
- name: pod-run-octavia
191-
mountPath: /var/run/octavia
188+
- name: pod-run-octavia
189+
mountPath: /var/run/octavia
192190
volumes:
193-
- name: pod-run-octavia
194-
emptyDir: {}
191+
- name: pod-run-octavia
192+
emptyDir: {}
195193
octavia_driver_agent:
196194
init_container: null
197195
octavia_bootstrap:

dev-requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ subprocess-tee==0.4.1
2222
tomli==2.0.1
2323
typing-extensions==4.9.0
2424
wcmatch==8.5
25-
yamllint==1.34.0
25+
yamllint==1.35.1
26+
pre_commit==4.1.0

submodules/nginx-gateway-fabric

-1
This file was deleted.

submodules/rook

-1
This file was deleted.

0 commit comments

Comments
 (0)