From 996c929c45eda8675d7e179e90bcf44291165d98 Mon Sep 17 00:00:00 2001 From: Pascal Zimmermann Date: Sun, 15 Feb 2026 23:25:41 +0100 Subject: [PATCH] feat: Update the lib version Signed-off-by: Pascal Zimmermann --- assets/go-licenses.json | 4 ++-- contrib/backport/backport.go | 2 +- go.mod | 5 +++-- go.sum | 6 ++++-- models/unittest/fixtures_loader.go | 2 +- modules/actions/workflows.go | 2 +- modules/issue/template/unmarshal.go | 2 +- modules/label/parser.go | 2 +- modules/markup/markdown/convertyaml.go | 2 +- modules/markup/markdown/meta.go | 2 +- modules/markup/markdown/renderconfig.go | 2 +- modules/markup/markdown/renderconfig_test.go | 2 +- modules/migration/file_format.go | 2 +- modules/optional/serialization.go | 2 +- modules/optional/serialization_test.go | 2 +- modules/packages/helm/metadata.go | 2 +- modules/packages/pub/metadata.go | 2 +- modules/packages/rubygems/metadata.go | 2 +- modules/structs/issue.go | 2 +- modules/structs/issue_test.go | 2 +- routers/api/packages/helm/helm.go | 2 +- routers/web/devtest/mail_preview.go | 2 +- routers/web/repo/actions/actions.go | 2 +- routers/web/repo/actions/view.go | 2 +- services/actions/concurrency.go | 2 +- services/actions/matrix.go | 4 ++-- services/actions/run.go | 2 +- services/actions/workflow.go | 2 +- services/issue/template.go | 2 +- services/migrations/dump.go | 2 +- services/migrations/restore.go | 2 +- tests/integration/api_issue_config_test.go | 2 +- tests/integration/api_packages_helm_test.go | 2 +- tests/integration/dump_restore_test.go | 2 +- 34 files changed, 41 insertions(+), 38 deletions(-) diff --git a/assets/go-licenses.json b/assets/go-licenses.json index bf0c1748110..34fe85fd52f 100644 --- a/assets/go-licenses.json +++ b/assets/go-licenses.json @@ -1310,8 +1310,8 @@ "licenseText": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"{}\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright {yyyy} {name of copyright owner}\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n" }, { - "name": "gopkg.in/yaml.v3", - "path": "gopkg.in/yaml.v3/LICENSE", + "name": "go.yaml.in/yaml/v4", + "path": "https://github.com/yaml/go-yaml?tab=Apache-2.0-1-ov-file#readme", "licenseText": "\nThis project is covered by two different licenses: MIT and Apache.\n\n#### MIT License ####\n\nThe following files were ported to Go from C files of libyaml, and thus\nare still covered by their original MIT license, with the additional\ncopyright staring in 2011 when the project was ported over:\n\n apic.go emitterc.go parserc.go readerc.go scannerc.go\n writerc.go yamlh.go yamlprivateh.go\n\nCopyright (c) 2006-2010 Kirill Simonov\nCopyright (c) 2006-2011 Kirill Simonov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n### Apache License ###\n\nAll the remaining project files are covered by the Apache license:\n\nCopyright (c) 2011-2019 Canonical Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" }, { diff --git a/contrib/backport/backport.go b/contrib/backport/backport.go index 5811291b42e..266b3c06407 100644 --- a/contrib/backport/backport.go +++ b/contrib/backport/backport.go @@ -18,7 +18,7 @@ import ( "github.com/google/go-github/v74/github" "github.com/urfave/cli/v3" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) const defaultVersion = "v1.18" // to backport to diff --git a/go.mod b/go.mod index f784ac25811..0dda6806a9b 100644 --- a/go.mod +++ b/go.mod @@ -112,6 +112,7 @@ require ( github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc github.com/yuin/goldmark-meta v1.1.0 gitlab.com/gitlab-org/api/client-go v0.142.4 + go.yaml.in/yaml/v4 v4.0.0-rc.2 golang.org/x/crypto v0.47.0 golang.org/x/image v0.35.0 golang.org/x/net v0.49.0 @@ -122,7 +123,6 @@ require ( google.golang.org/grpc v1.78.0 google.golang.org/protobuf v1.36.11 gopkg.in/ini.v1 v1.67.1 - gopkg.in/yaml.v3 v3.0.1 mvdan.cc/xurls/v2 v2.6.0 strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251 xorm.io/builder v0.3.13 @@ -285,6 +285,7 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) ignore ( @@ -294,7 +295,7 @@ ignore ( replace github.com/jaytaylor/html2text => github.com/Necoro/html2text v0.0.0-20250804200300-7bf1ce1c7347 -replace github.com/nektos/act => gitea.com/gitea/act v0.261.7-0.20251003180512-ac6e4b751763 +replace github.com/nektos/act => gitea.com/Zpascal/act v0.261.8-0.20260214183821-e8a26f46cc5c replace git.sr.ht/~mariusor/go-xsd-duration => gitea.com/gitea/go-xsd-duration v0.0.0-20220703122237-02e73435a078 diff --git a/go.sum b/go.sum index b10e259c919..930d4346e06 100644 --- a/go.sum +++ b/go.sum @@ -31,8 +31,8 @@ dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -gitea.com/gitea/act v0.261.7-0.20251003180512-ac6e4b751763 h1:ohdxegvslDEllZmRNDqpKun6L4Oq81jNdEDtGgHEV2c= -gitea.com/gitea/act v0.261.7-0.20251003180512-ac6e4b751763/go.mod h1:Pg5C9kQY1CEA3QjthjhlrqOC/QOT5NyWNjOjRHw23Ok= +gitea.com/Zpascal/act v0.261.8-0.20260214183821-e8a26f46cc5c h1:hZWOfjsKaJ6IiBaw7kjEuIU/dJOMh3rRzqMLFI2NRMA= +gitea.com/Zpascal/act v0.261.8-0.20260214183821-e8a26f46cc5c/go.mod h1:lTp4136rwbZiZS3ZVQeHCvd4qRAZ7LYeiRBqOSdMY/4= gitea.com/gitea/go-xsd-duration v0.0.0-20220703122237-02e73435a078 h1:BAFmdZpRW7zMQZQDClaCWobRj9uL1MR3MzpCVJvc5s4= gitea.com/gitea/go-xsd-duration v0.0.0-20220703122237-02e73435a078/go.mod h1:g/V2Hjas6Z1UHUp4yIx6bATpNzJ7DYtD0FG3+xARWxs= gitea.com/go-chi/binding v0.0.0-20240430071103-39a851e106ed h1:EZZBtilMLSZNWtHHcgq2mt6NSGhJSZBuduAlinMEmso= @@ -829,6 +829,8 @@ go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +go.yaml.in/yaml/v4 v4.0.0-rc.2 h1:/FrI8D64VSr4HtGIlUtlFMGsm7H7pWTbj6vOLVZcA6s= +go.yaml.in/yaml/v4 v4.0.0-rc.2/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0= go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc= go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEbFGHD4hhz6S1ZYeaU= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/models/unittest/fixtures_loader.go b/models/unittest/fixtures_loader.go index d92b0cdb14d..784a5ebe241 100644 --- a/models/unittest/fixtures_loader.go +++ b/models/unittest/fixtures_loader.go @@ -14,7 +14,7 @@ import ( "code.gitea.io/gitea/models/db" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" "xorm.io/xorm" "xorm.io/xorm/schemas" ) diff --git a/modules/actions/workflows.go b/modules/actions/workflows.go index 26a6ebc3700..9a0ae49b76c 100644 --- a/modules/actions/workflows.go +++ b/modules/actions/workflows.go @@ -18,7 +18,7 @@ import ( "github.com/nektos/act/pkg/jobparser" "github.com/nektos/act/pkg/model" "github.com/nektos/act/pkg/workflowpattern" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) type DetectedWorkflow struct { diff --git a/modules/issue/template/unmarshal.go b/modules/issue/template/unmarshal.go index ceab6babf4c..2abf72fc7c8 100644 --- a/modules/issue/template/unmarshal.go +++ b/modules/issue/template/unmarshal.go @@ -14,7 +14,7 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // CouldBe indicates a file with the filename could be a template, diff --git a/modules/label/parser.go b/modules/label/parser.go index 2a101520626..635d319614b 100644 --- a/modules/label/parser.go +++ b/modules/label/parser.go @@ -10,7 +10,7 @@ import ( "code.gitea.io/gitea/modules/options" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) type labelFile struct { diff --git a/modules/markup/markdown/convertyaml.go b/modules/markup/markdown/convertyaml.go index 04664a9c1db..3034fae2bcb 100644 --- a/modules/markup/markdown/convertyaml.go +++ b/modules/markup/markdown/convertyaml.go @@ -11,7 +11,7 @@ import ( "github.com/yuin/goldmark/ast" east "github.com/yuin/goldmark/extension/ast" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func nodeToTable(meta *yaml.Node) ast.Node { diff --git a/modules/markup/markdown/meta.go b/modules/markup/markdown/meta.go index e76b253ecd2..65352cee05d 100644 --- a/modules/markup/markdown/meta.go +++ b/modules/markup/markdown/meta.go @@ -9,7 +9,7 @@ import ( "unicode" "unicode/utf8" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func isYAMLSeparator(line []byte) bool { diff --git a/modules/markup/markdown/renderconfig.go b/modules/markup/markdown/renderconfig.go index d8b1b10ce63..19e15f48862 100644 --- a/modules/markup/markdown/renderconfig.go +++ b/modules/markup/markdown/renderconfig.go @@ -10,7 +10,7 @@ import ( "code.gitea.io/gitea/modules/markup" "github.com/yuin/goldmark/ast" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // RenderConfig represents rendering configuration for this file diff --git a/modules/markup/markdown/renderconfig_test.go b/modules/markup/markdown/renderconfig_test.go index 53c52177a75..84e4ac33f66 100644 --- a/modules/markup/markdown/renderconfig_test.go +++ b/modules/markup/markdown/renderconfig_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func TestRenderConfig_UnmarshalYAML(t *testing.T) { diff --git a/modules/migration/file_format.go b/modules/migration/file_format.go index e8b6891ca11..aca2885eefc 100644 --- a/modules/migration/file_format.go +++ b/modules/migration/file_format.go @@ -13,7 +13,7 @@ import ( "code.gitea.io/gitea/modules/log" "github.com/santhosh-tekuri/jsonschema/v5" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // Load project data from file, with optional validation diff --git a/modules/optional/serialization.go b/modules/optional/serialization.go index b120a0edf6b..c656925b543 100644 --- a/modules/optional/serialization.go +++ b/modules/optional/serialization.go @@ -6,7 +6,7 @@ package optional import ( "code.gitea.io/gitea/modules/json" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func (o *Option[T]) UnmarshalJSON(data []byte) error { diff --git a/modules/optional/serialization_test.go b/modules/optional/serialization_test.go index c059294bbb9..12bf747d11d 100644 --- a/modules/optional/serialization_test.go +++ b/modules/optional/serialization_test.go @@ -11,7 +11,7 @@ import ( "code.gitea.io/gitea/modules/optional" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) type testSerializationStruct struct { diff --git a/modules/packages/helm/metadata.go b/modules/packages/helm/metadata.go index 421fc5e7259..b5e9299458e 100644 --- a/modules/packages/helm/metadata.go +++ b/modules/packages/helm/metadata.go @@ -13,7 +13,7 @@ import ( "code.gitea.io/gitea/modules/validation" "github.com/hashicorp/go-version" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) var ( diff --git a/modules/packages/pub/metadata.go b/modules/packages/pub/metadata.go index a2cf6b728ab..00d24e84838 100644 --- a/modules/packages/pub/metadata.go +++ b/modules/packages/pub/metadata.go @@ -14,7 +14,7 @@ import ( "code.gitea.io/gitea/modules/validation" "github.com/hashicorp/go-version" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) var ( diff --git a/modules/packages/rubygems/metadata.go b/modules/packages/rubygems/metadata.go index 5c01abc7435..fc6c75840f8 100644 --- a/modules/packages/rubygems/metadata.go +++ b/modules/packages/rubygems/metadata.go @@ -14,7 +14,7 @@ import ( "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/validation" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) var ( diff --git a/modules/structs/issue.go b/modules/structs/issue.go index 2540481d0ff..22116091ab0 100644 --- a/modules/structs/issue.go +++ b/modules/structs/issue.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // StateType issue state type diff --git a/modules/structs/issue_test.go b/modules/structs/issue_test.go index 55bd01df496..0ad05c159a0 100644 --- a/modules/structs/issue_test.go +++ b/modules/structs/issue_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func TestIssueTemplate_Type(t *testing.T) { diff --git a/routers/api/packages/helm/helm.go b/routers/api/packages/helm/helm.go index 4c1b72d5c01..f49130ad723 100644 --- a/routers/api/packages/helm/helm.go +++ b/routers/api/packages/helm/helm.go @@ -23,7 +23,7 @@ import ( "code.gitea.io/gitea/services/context" packages_service "code.gitea.io/gitea/services/packages" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func apiError(ctx *context.Context, status int, obj any) { diff --git a/routers/web/devtest/mail_preview.go b/routers/web/devtest/mail_preview.go index 7b1787d52bc..9e2c51153ec 100644 --- a/routers/web/devtest/mail_preview.go +++ b/routers/web/devtest/mail_preview.go @@ -12,7 +12,7 @@ import ( "code.gitea.io/gitea/services/context" "code.gitea.io/gitea/services/mailer" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func MailPreviewRender(ctx *context.Context) { diff --git a/routers/web/repo/actions/actions.go b/routers/web/repo/actions/actions.go index 43c56752e84..e91f96f7c63 100644 --- a/routers/web/repo/actions/actions.go +++ b/routers/web/repo/actions/actions.go @@ -29,7 +29,7 @@ import ( "code.gitea.io/gitea/services/convert" act_model "github.com/nektos/act/pkg/model" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) const ( diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index cc70cd4e065..9bbe5006ded 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -35,7 +35,7 @@ import ( notify_service "code.gitea.io/gitea/services/notify" "github.com/nektos/act/pkg/model" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" "xorm.io/builder" ) diff --git a/services/actions/concurrency.go b/services/actions/concurrency.go index 09083027094..1f8951563fb 100644 --- a/services/actions/concurrency.go +++ b/services/actions/concurrency.go @@ -13,7 +13,7 @@ import ( "github.com/nektos/act/pkg/jobparser" act_model "github.com/nektos/act/pkg/model" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // EvaluateRunConcurrencyFillModel evaluates the expressions in a run-level (workflow) concurrency, diff --git a/services/actions/matrix.go b/services/actions/matrix.go index 1f82887fb5c..5fddd2877ab 100644 --- a/services/actions/matrix.go +++ b/services/actions/matrix.go @@ -15,7 +15,7 @@ import ( "code.gitea.io/gitea/modules/log" "github.com/nektos/act/pkg/jobparser" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // ExtractRawStrategies extracts strategy definitions from the raw workflow content @@ -183,7 +183,7 @@ func ReEvaluateMatrixForJobWithNeeds(ctx context.Context, job *actions_model.Act workflowYAML, jobparser.WithVars(mergedVars), jobparser.WithGitContext(giteaCtx.ToGitHubContext()), - // jobparser.WithJobOutputs(jobOutputs), + jobparser.WithJobOutputs(jobOutputs), jobparser.WithJobResults(jobResults), ) parseTime := time.Since(parseStartTime) diff --git a/services/actions/run.go b/services/actions/run.go index 093d3c8efdc..b24c3dddc94 100644 --- a/services/actions/run.go +++ b/services/actions/run.go @@ -13,7 +13,7 @@ import ( notify_service "code.gitea.io/gitea/services/notify" "github.com/nektos/act/pkg/jobparser" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // PrepareRunAndInsert prepares a run and inserts it into the database diff --git a/services/actions/workflow.go b/services/actions/workflow.go index 4f72aad1124..0a0a41f7557 100644 --- a/services/actions/workflow.go +++ b/services/actions/workflow.go @@ -23,7 +23,7 @@ import ( "github.com/nektos/act/pkg/jobparser" "github.com/nektos/act/pkg/model" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func EnableOrDisableWorkflow(ctx *context.APIContext, workflowID string, isEnable bool) error { diff --git a/services/issue/template.go b/services/issue/template.go index 99977c67cf8..f1a78c6ae0a 100644 --- a/services/issue/template.go +++ b/services/issue/template.go @@ -16,7 +16,7 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // templateDirCandidates issue templates directory diff --git a/services/migrations/dump.go b/services/migrations/dump.go index 04a4569a120..4c570fa3ab2 100644 --- a/services/migrations/dump.go +++ b/services/migrations/dump.go @@ -26,7 +26,7 @@ import ( "code.gitea.io/gitea/modules/structs" "github.com/google/uuid" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) var _ base.Uploader = &RepositoryDumper{} diff --git a/services/migrations/restore.go b/services/migrations/restore.go index 56862859350..bc4cc4b19d3 100644 --- a/services/migrations/restore.go +++ b/services/migrations/restore.go @@ -12,7 +12,7 @@ import ( base "code.gitea.io/gitea/modules/migration" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) // RepositoryRestorer implements an Downloader from the local directory diff --git a/tests/integration/api_issue_config_test.go b/tests/integration/api_issue_config_test.go index f6045e1a805..e8d91e5c710 100644 --- a/tests/integration/api_issue_config_test.go +++ b/tests/integration/api_issue_config_test.go @@ -15,7 +15,7 @@ import ( "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func createIssueConfig(t *testing.T, user *user_model.User, repo *repo_model.Repository, issueConfig map[string]any) { diff --git a/tests/integration/api_packages_helm_test.go b/tests/integration/api_packages_helm_test.go index 02df4ae906d..be999940bd3 100644 --- a/tests/integration/api_packages_helm_test.go +++ b/tests/integration/api_packages_helm_test.go @@ -20,7 +20,7 @@ import ( "code.gitea.io/gitea/tests" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func TestPackageHelm(t *testing.T) { diff --git a/tests/integration/dump_restore_test.go b/tests/integration/dump_restore_test.go index d2d43075c3c..1758a81d117 100644 --- a/tests/integration/dump_restore_test.go +++ b/tests/integration/dump_restore_test.go @@ -23,7 +23,7 @@ import ( "code.gitea.io/gitea/services/migrations" "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" + "go.yaml.in/yaml/v4" ) func TestDumpRestore(t *testing.T) {