{"id":332360,"date":"2022-04-25T09:00:16","date_gmt":"2022-04-25T09:00:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=332360"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=332360","title":{"rendered":"<span>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0435\u043b\u0438\u0437\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e github-action \u0438 semantic-release. \u0410 \u0442\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Pre-commit \u0432 Github action<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 semantic-release \u0434\u043b\u044f terraform \u043c\u043e\u0434\u0443\u043b\u044f <a href=\"https:\/\/github.com\/patsevanton\/terraform-yandex-compute\" rel=\"nofollow noopener noreferrer\">terraform-yandex-compute<\/a> (\u041c\u043e\u0434\u0443\u043b\u044c Terraform, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u042f\u043d\u0434\u0435\u043a\u0441\u0430) c Github action.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/48\/pw\/mh\/48pwmhz8zympftvx9lkcfcto9b4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/48\/pw\/mh\/48pwmhz8zympftvx9lkcfcto9b4.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0410 \u0442\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Pre-commit \u0432 Github action.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/uo\/cn\/ya\/uocnya6a2dr0sscqyy1grfksyig.png\" data-src=\"https:\/\/habrastorage.org\/webt\/uo\/cn\/ya\/uocnya6a2dr0sscqyy1grfksyig.png\"\/><\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h4 id=\"semanticheski-upravleniem-versiyami-s-pomoschyu-semantic-release-i-github-action\">\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e semantic-release \u0438 github-action<\/h4>\n<p>  <\/p>\n<p>Semantic-release \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0441\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u0430, \u0432\u043a\u043b\u044e\u0447\u0430\u044f: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 release notes (CHANGELOG.md) \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u0430\u043a\u0435\u0442\u0430.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u044d\u043c\u043e\u0446\u0438\u044f\u043c\u0438 \u0438 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u0439, \u0441\u0442\u0440\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f\u043c \u043e \u0432\u043b\u0438\u044f\u043d\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u043c.<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0415\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0432\u0435\u0442\u043a\u0430 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 (master). \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u2014 feature \u0432\u0435\u0442\u043a\u0438<\/li>\n<li>\u041d\u043e\u0432\u044b\u0439 Pull Request \u2014 \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u043b\u0438\u0437<\/li>\n<li>\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u2014 1.0.0<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0414\u043b\u044f semantic-release \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c .releaserc.json. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c <a href=\"https:\/\/github.com\/patsevanton\/terraform-yandex-compute\/blob\/main\/.releaserc.json\" rel=\"nofollow noopener noreferrer\">.releaserc.json<\/a> \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0442\u0430\u043c \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c. \u0412\u0441\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Semantic Release \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0433\u0430\u0439\u0434\u043b\u0430\u0439\u043d\u0443 <a href=\"https:\/\/github.com\/angular\/angular\/blob\/master\/CONTRIBUTING.md#-commit-message-format\" rel=\"nofollow noopener noreferrer\">Angular Commit Messages<\/a>. \u0412 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 <a href=\"https:\/\/github.com\/patsevanton\/terraform-yandex-compute\" rel=\"nofollow noopener noreferrer\">terraform-yandex-compute<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 <a href=\"https:\/\/github.com\/patsevanton\/terraform-yandex-compute\/blob\/main\/.releaserc.json#L11\" rel=\"nofollow noopener noreferrer\">ESLint<\/a><\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043f\u0443\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 master \u0432\u0435\u0442\u043a\u0443, semantic release \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0441\u043a\u0430\u043d \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u043d\u043e\u0433\u043e \u0442\u0435\u0433\u0430. \u0412 <a href=\"https:\/\/github.com\/patsevanton\/terraform-yandex-compute\/blob\/main\/.releaserc.json#L12\" rel=\"nofollow noopener noreferrer\">releaseRules<\/a> \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441\u043c\u0435\u043d\u044b \u0432\u0435\u0440\u0441\u0438\u0438. <\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">        \"releaseRules\": [           {\"tag\": \"breaking\", \"release\": \"major\"},           {\"tag\": \"chore\", \"release\": false},           {\"tag\": \"ci\", \"release\": false},           {\"tag\": \"docs\", \"release\": false},           {\"tag\": \"feat\", \"release\": \"minor\"},           {\"tag\": \"fix\", \"release\": \"patch\"},           {\"tag\": \"refactor\", \"release\": \"patch\"},           {\"tag\": \"security\", \"release\": \"patch\"},           {\"tag\": \"style\", \"release\": \"patch\"},           {\"tag\": \"test\", \"release\": false}         ]<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430 (\u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u043c) \u0432 Git \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0442\u0435\u0433, \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e <a href=\"https:\/\/github.com\/patsevanton\/terraform-yandex-compute\/blob\/main\/CHANGELOG.md\" rel=\"nofollow noopener noreferrer\">Release Notes (CHANGELOG.md)<\/a><\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0447\u0442\u043e \u0432\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a PR \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u0447\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/patsevanton\/terraform-yandex-compute\/blob\/main\/.github\/workflows\/pr-title.yml\" rel=\"nofollow noopener noreferrer\">pr-title.yml<\/a><\/p>\n<p>  <\/p>\n<p>\u0423 \u0441\u0435\u0431\u044f \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043b\u044f <a href=\"https:\/\/github.com\/conveyal\/maven-semantic-release\" rel=\"nofollow noopener noreferrer\">Maven<\/a> \u0438 <a href=\"https:\/\/github.com\/tschulte\/gradle-semantic-release-plugin\" rel=\"nofollow noopener noreferrer\">Gradle<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u043e semantic-release \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u044f\u0445:<\/p>\n<p>  <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/ru_mts\/blog\/572774\/\">\u041a\u0430\u043a \u043c\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 Release Notes<\/a><\/p>\n<p>  <\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/jugru\/blog\/527436\/\">\u041a\u0430\u043a \u0440\u0435\u043b\u0438\u0437\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0432 2020 \u0433\u043e\u0434\u0443<\/a><\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h4 id=\"avtomatiziruem-proverku-koda-s-pomoschyu-pre-commit-v-github-action\">\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043a\u043e\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Pre-commit \u0432 Github action.<\/h4>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 code review \u0442\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0448\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043d\u0430 \u0432\u0435\u0449\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043e\u0442\u043b\u043e\u0432\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438? \u0421 \u0443\u0436\u0430\u0441\u043e\u043c \u0432\u0438\u0434\u0438\u0448\u044c \u043a\u043e\u0434 \u0441 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439? \u0425\u0432\u0430\u0442\u0438\u0442 \u044d\u0442\u043e \u0442\u0435\u0440\u043f\u0435\u0442\u044c! \u0423 \u043d\u0430\u0441 \u0436\u0435 \u0435\u0441\u0442\u044c Pre-commit!<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 pre-commit hooks. \u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 Git \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0438\/\u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044e (\u0441\u043c. \u0440\u0438\u0441\u0443\u043d\u043e\u043a \u043d\u0438\u0436\u0435), \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0443\u0442\u0438\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0438\u0437 feature \u0432\u0435\u0442\u043a\u0438 \u0432 main\/master \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c git-hook <a href=\"https:\/\/pre-commit.com\/\" rel=\"nofollow noopener noreferrer\">pre-commit<\/a><\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c commit \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041f\u0435\u0440\u0435\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430.<\/li>\n<li>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/li>\n<li>\u0410\u043f\u0433\u0440\u0435\u0439\u0434 \u043a\u043e\u0434\u0430 \u043f\u043e\u0434 \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u044f\u0437\u044b\u043a\u0430.<\/li>\n<li>\u041f\u0435\u0440\u0435\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/li>\n<li>\u0417\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 pre-commit \u0432 PR \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c .pre-commit-config.yaml \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c pre-commit run &#8212;all-files \u0432 \u044d\u0442\u043e\u043c PR. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/pre-commit\/action\" rel=\"nofollow noopener noreferrer\">GitHub action to run pre-commit<\/a> \u0438\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 <a href=\"https:\/\/github.com\/openai\/gym\/blob\/master\/.github\/workflows\/pre-commit.yml\" rel=\"nofollow noopener noreferrer\">\u0441\u0442\u0430\u0440\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 pre-commit \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 openai\/gym<\/a><\/p>\n<p>  <\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u043e pre-commit:<\/p>\n<p>  <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/dou.ua\/forums\/topic\/32915\/\" rel=\"nofollow noopener noreferrer\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 pre-commit hooks \u0434\u043b\u044f Git \u0438 \u0437\u0430\u0447\u0435\u043c \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b<\/a><\/p>\n<p>  <\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/302932\/\">\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043a\u043e\u0434\u0430 \u0438\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e pre-commit hook&#8217;\u0430\u0445<\/a><\/p>\n<p>  <\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/503270\/\">\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f .pre-commit hook \u0432 Django \u043f\u0440\u043e\u0435\u043a\u0442<\/a><\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f <a href=\"https:\/\/github.com\/patsevanton\/terraform-yandex-compute\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/patsevanton\/terraform-yandex-compute<\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0438\u043f\u044b c \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">        breaking         chore         ci         docs         feat         fix         refactor         security         style         test<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u0438 \u0442\u0438\u043f\u044b \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c \u0432 <a href=\"https:\/\/github.com\/patsevanton\/terraform-yandex-compute\/blob\/main\/.releaserc.json#L12\" rel=\"nofollow noopener noreferrer\">releaseRules<\/a> \u0432 .releaserc.json. \u0412 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0442\u0438\u043f\u044b. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e github action:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">name: 'Validate PR title'  on:   pull_request_target:     types:       - opened       - edited       - synchronize  jobs:   main:     name: Validate PR title     runs-on: ubuntu-latest     steps:       - uses: amannn\/action-semantic-pull-request@v3.4.6         env:           GITHUB_TOKEN: ${{ secrets.TERRAFORM_YANDEX_COMPUTE_TOKEN }}         with:           # Configure which types are allowed.           # Default: https:\/\/github.com\/commitizen\/conventional-commit-types           types: |             breaking             chore             ci             docs             feat             fix             refactor             security             style             test           requireScope: false           subjectPattern: ^(?![A-Z]).+$           subjectPatternError: |             The subject \"{subject}\" found in the pull request title \"{title}\"             didn't match the configured pattern. Please ensure that the subject             doesn't start with an uppercase character.           wip: true           validateSingleCommit: false<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u0432\u0438\u0434\u0443 \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0435\u043b\u0438\u0437 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432: <\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">      - '**\/*.tpl'       - '**\/*.py'       - '**\/*.tf'       - '.github\/workflows\/release.yml'<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e github action:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">name: Release  on:   workflow_dispatch:   push:     branches:       - main       - master     paths:       - '**\/*.tpl'       - '**\/*.py'       - '**\/*.tf'       - '.github\/workflows\/release.yml'  jobs:   release:     name: Release     runs-on: ubuntu-latest     # Skip running release workflow on forks     if: github.repository_owner == 'patsevanton'     steps:       - name: Checkout         uses: actions\/checkout@v2         with:           persist-credentials: false           fetch-depth: 0        - name: Release         uses: cycjimmy\/semantic-release-action@v2         with:           semantic_version: 18.0.0           extra_plugins: |             @semantic-release\/changelog@6.0.0             @semantic-release\/git@10.0.0             conventional-changelog-conventionalcommits@4.6.3             conventional-changelog-eslint@3.0.9         env:           GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 releaseRules, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">breaking \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043b\u0438\u0437 major \u0432\u0435\u0440\u0441\u0438\u0438 chore \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043b\u0438\u0437  ci \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043b\u0438\u0437  docs \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043b\u0438\u0437  feat \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043b\u0438\u0437 minor \u0432\u0435\u0440\u0441\u0438\u0438 fix \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043b\u0438\u0437 patch \u0432\u0435\u0440\u0441\u0438\u0438 refactor \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043b\u0438\u0437 patch \u0432\u0435\u0440\u0441\u0438\u0438 security \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043b\u0438\u0437 patch \u0432\u0435\u0440\u0441\u0438\u0438 style \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043b\u0438\u0437 patch \u0432\u0435\u0440\u0441\u0438\u0438 test \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043b\u0438\u0437 <\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043b\u044f terraform, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043a\u043e\u0434\u0430 \u043d\u0430 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u0441\u0442\u0438\u043b\u044c \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e github action:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\"># https:\/\/pre-commit.com # This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file. name: pre-commit on:   pull_request:   push:     branches: [master] jobs:   pre-commit:     runs-on: ubuntu-latest     steps:       - uses: actions\/checkout@v2       - uses: actions\/setup-python@v2       - run: pip install pre-commit       - run: pre-commit --version       - run: pre-commit install       - run: pre-commit run --all-files<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u043c\u043c\u0438\u0442\u0435 \u043a\u043e\u0434 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d \u043d\u0435 \u043f\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u043c\u0443 \u0441\u0442\u0438\u043b\u044e \u0438\u043b\u0438 \u0435\u0441\u0442\u044c unit-test \u043f\u0430\u0434\u0430\u044e\u0442, \u0442\u043e \u0437\u0430\u0444\u0435\u0439\u043b\u0438\u0442\u0441\u044f github action<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 pre-commit \u0438 \u043e\u043d \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 \u043f\u0440\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u0435, \u0442\u043e github action \u043d\u0435 \u0432\u044b\u0434\u0430\u0441\u0442 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e open source \u043f\u0440\u043e\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0442\u043e-\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u043a\u0438, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 Contribution guide \u0438 \u043d\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0441\u0435\u0431\u0435 pre-commit \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u0442\u043e CI \u0442\u0430\u043a\u043e\u0435 \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442.<\/p>\n<p>  <\/p>\n<p><strong>P.S.<\/strong> \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043a\u043e\u043c\u043a\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0441\u0442. \u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0447\u0442\u043e \u0435\u0449\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c\/\u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/662738\/\"> https:\/\/habr.com\/ru\/post\/662738\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 semantic-release \u0434\u043b\u044f terraform \u043c\u043e\u0434\u0443\u043b\u044f <a href=\"https:\/\/github.com\/patsevanton\/terraform-yandex-compute\" rel=\"nofollow noopener noreferrer\">terraform-yandex-compute<\/a> (\u041c\u043e\u0434\u0443\u043b\u044c Terraform, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u042f\u043d\u0434\u0435\u043a\u0441\u0430) c Github action.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/48\/pw\/mh\/48pwmhz8zympftvx9lkcfcto9b4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/48\/pw\/mh\/48pwmhz8zympftvx9lkcfcto9b4.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0410 \u0442\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Pre-commit \u0432 Github action.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/uo\/cn\/ya\/uocnya6a2dr0sscqyy1grfksyig.png\" data-src=\"https:\/\/habrastorage.org\/webt\/uo\/cn\/ya\/uocnya6a2dr0sscqyy1grfksyig.png\"\/><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-332360","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=332360"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332360\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=332360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=332360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=332360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}