Skip to content

Commit c3b65d3

Browse files
authored
Merge branch 'main' into feat/conntrack
2 parents 8278001 + 0d05c39 commit c3b65d3

File tree

5 files changed

+32
-39
lines changed

5 files changed

+32
-39
lines changed

.github/workflows/commit-message.yaml

+23-30
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: commit-message
22
on:
33
merge_group:
44
pull_request:
5-
branches: [ main ]
5+
branches: [main]
66
types:
77
- opened
88
- synchronize
@@ -13,33 +13,26 @@ jobs:
1313
if: ${{ github.event_name != 'merge_group' }}
1414
runs-on: ubuntu-20.04
1515
steps:
16-
- name: verify_commit_message
17-
run: |
18-
if [[ "${{ github.event_name }}" == pull_request ]]; then
19-
commit_msg_header="${{ github.event.pull_request.title }}"
20-
else
21-
# get first line of commit message
22-
commit_msg_header=`echo "${{ github.event.head_commit.message }}" | head -n 1`
23-
fi
16+
- name: verify_commit_message
17+
env:
18+
TITLE: ${{ github.event.pull_request.title }}
19+
run: |
20+
commit_msg_type_regex='feat|fix|refactor|style|test|docs|build|tool|chore|deps'
21+
commit_msg_scope_regex='.{1,20}'
22+
commit_msg_subject_regex='.{1,150}'
23+
commit_msg_regex="^(${commit_msg_type_regex})(\(${commit_msg_scope_regex}\))?: (${commit_msg_subject_regex})\$"
24+
merge_msg_regex="^Merge branch '.+' into .+\$"
25+
full_regex="(${commit_msg_regex})|(${merge_msg_regex})"
2426
25-
commit_msg_type_regex='feat|fix|refactor|style|test|docs|build|tool|chore|deps'
26-
commit_msg_scope_regex='.{1,20}'
27-
commit_msg_subject_regex='.{1,150}'
28-
commit_msg_regex="^(${commit_msg_type_regex})(\(${commit_msg_scope_regex}\))?: (${commit_msg_subject_regex})\$"
29-
merge_msg_regex="^Merge branch '.+' into .+\$"
30-
full_regex="(${commit_msg_regex})|(${merge_msg_regex})"
31-
32-
echo $commit_msg_header | grep -qP "$full_regex" || {
33-
echo "ERROR: Invalid commit message header. Please fix format of your PR title or the commit pushed to main."
34-
echo "Current value:"
35-
echo "$commit_msg_header"
36-
echo
37-
echo "Examples of valid commits:"
38-
echo 'example 1: "feat(cli): new feature"'
39-
echo 'example 2: "fix(advanced-metrics): bug fix"'
40-
echo 'example 3: "docs: update readme"'
41-
echo
42-
echo "Valid types are: $commit_msg_type_regex"
43-
echo "For more details, see .github/workflows/commit-message.yaml"
44-
exit 1
45-
}
27+
grep -qP "$full_regex" <<< "$TITLE" || {
28+
echo "ERROR: Invalid commit message header. Please fix format of your PR title."
29+
echo
30+
echo "Examples of valid commits:"
31+
echo 'example 1: "feat(cli): new feature"'
32+
echo 'example 2: "fix(advanced-metrics): bug fix"'
33+
echo 'example 3: "docs: update readme"'
34+
echo
35+
echo "Valid types are: $commit_msg_type_regex"
36+
echo "For more details, see .github/workflows/commit-message.yaml"
37+
exit 1
38+
}

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ require (
273273
github.com/microsoft/ApplicationInsights-Go v0.4.4
274274
github.com/onsi/ginkgo v1.16.5
275275
github.com/onsi/ginkgo/v2 v2.17.1
276-
github.com/onsi/gomega v1.32.0
276+
github.com/onsi/gomega v1.33.0
277277
github.com/pkg/errors v0.9.1
278278
github.com/prometheus/client_model v0.6.0
279-
github.com/prometheus/common v0.52.3
279+
github.com/prometheus/common v0.53.0
280280
github.com/safchain/ethtool v0.3.0
281281
github.com/spf13/viper v1.18.2
282282
github.com/vishvananda/netlink v1.2.1-beta.2.0.20231127184239-0ced8385386a

go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,8 @@ github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3Hig
631631
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
632632
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
633633
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
634-
github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk=
635-
github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg=
634+
github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE=
635+
github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY=
636636
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
637637
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
638638
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
@@ -685,8 +685,8 @@ github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOA
685685
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
686686
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
687687
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
688-
github.com/prometheus/common v0.52.3 h1:5f8uj6ZwHSscOGNdIQg6OiZv/ybiK2CO2q2drVZAQSA=
689-
github.com/prometheus/common v0.52.3/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U=
688+
github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE=
689+
github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U=
690690
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
691691
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
692692
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=

hack/tools/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ require (
375375
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect
376376
golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect
377377
golang.org/x/mod v0.16.0 // indirect
378-
golang.org/x/net v0.22.0 // indirect
378+
golang.org/x/net v0.23.0 // indirect
379379
golang.org/x/oauth2 v0.19.0 // indirect
380380
golang.org/x/sync v0.7.0 // indirect
381381
golang.org/x/sys v0.19.0 // indirect

hack/tools/go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1249,8 +1249,8 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
12491249
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
12501250
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
12511251
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
1252-
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
1253-
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
1252+
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
1253+
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
12541254
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
12551255
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
12561256
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=

0 commit comments

Comments
 (0)