{"id":367402,"date":"2024-05-21T03:20:16","date_gmt":"2024-05-21T03:20:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=367402"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T03:20:16","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=367402","title":{"rendered":"<span>\u0428\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c: \u041a\u0430\u043a \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c ChatGPT \u0434\u043b\u044f \u0440\u0435\u0432\u044c\u044e \u043f\u0443\u043b\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 GitHub \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e GitHub Actions<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042f \u0440\u0435\u0448\u0438\u043b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0439 open source <a href=\"https:\/\/github.com\/Dankosik\/invest-api-java-sdk-starter\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0435\u043a\u0442<\/a> <em>ChatGPT<\/em> \u043a\u0430\u043a \u0440\u0435\u0432\u044c\u044e\u0435\u0440\u0430 \u043f\u0443\u043b\u043b \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u0440\u0430\u0437\u0443 \u043c\u043e\u0433 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0435\u0447\u0430\u043a\u0442\u043a\u0438 \u0438 \u043c\u0435\u043b\u043a\u0438\u0435 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u043e\u0434\u0435. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u0437 \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432, \u043a\u0430\u0440\u0442 \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0412\u041f\u041d\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 ProxyAPI \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 <code>yml<\/code> \u0444\u0430\u0439\u043b \u0434\u043b\u044f <em>GitHub Actions<\/em>.<\/p>\n<h3>\u041d\u0430\u0447\u0430\u043b\u043e<\/h3>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0441 \u0447\u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0447\u0430\u0442\u044c &#8212; \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 <code>.github\/workflows\/cr.yml<\/code> \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0421\u0430\u043c\u043e \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"yaml\">name: Code Review  permissions:   contents: read   pull-requests: write  on:   pull_request:     types: [opened, reopened, synchronize]  jobs:   test:     runs-on: ubuntu-latest     steps:       - uses: anc95\/ChatGPT-CodeReview@v1.0.11         env:           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}           OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}           LANGUAGE: Russian           OPENAI_API_ENDPOINT: https:\/\/api.proxyapi.ru\/openai\/v1           MODEL: gpt-3.5-turbo           PROMPT: \"You are an experienced Kotlin\/Java developer and your job is to review pull requests. Please review the following code for any misunderstandings or violations. Don't spend time commenting on what is already working perfectly. I'm looking for constructive criticism and suggestions for improving the code, only useful and thorough notes.\" <\/code><\/pre>\n<p>\u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e \u0432\u0430\u0436\u043d\u044b\u0435.<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c action <code>- uses: anc95\/ChatGPT-CodeReview@v1.0.11<\/code> <a href=\"https:\/\/github.com\/anc95\/ChatGPT-CodeReview\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>.<\/p>\n<h3>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c \u044d\u0442\u043e\u0433\u043e action:<\/h3>\n<ul>\n<li>\n<p><em>GITHUB_TOKEN<\/em> \u043d\u0443\u0436\u0435\u043d \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 actions (\u043f\u0440\u043e <a href=\"https:\/\/docs.github.com\/en\/actions\/security-guides\/automatic-token-authentication\" rel=\"noopener noreferrer nofollow\">GITHUB_TOKEN<\/a>)<\/p>\n<\/li>\n<li>\n<p><em>OPENAI_API_KEY<\/em> &#8212; \u044d\u0442\u043e \u043a\u043b\u044e\u0447 OpenAI. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a OpenAI \u0438\u0437 \u0420\u0424, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 <a href=\"https:\/\/proxyapi.ru\/\" rel=\"noopener noreferrer nofollow\">ProxyAPI<\/a>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u0430\u0431\u0438\u043d\u0435\u0442 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u044e\u0447:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/xn\/up\/pd\/xnuppdewb_ujm46yoruf0byivsk.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/xn\/up\/pd\/xnuppdewb_ujm46yoruf0byivsk.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u043a\u0440\u0435\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c OPENAI_API_KEY (\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u0438\u043c\u044f) \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438: <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/uo\/zg\/my\/uozgmygakxu4vcjjmvwnahpvhvw.png\" data-src=\"https:\/\/habrastorage.org\/webt\/uo\/zg\/my\/uozgmygakxu4vcjjmvwnahpvhvw.png\"\/><\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/kd\/cm\/hr\/kdcmhrlizipjh_uw1phh9y8mk-k.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/kd\/cm\/hr\/kdcmhrlizipjh_uw1phh9y8mk-k.jpeg\" data-blurred=\"true\"\/><\/figure>\n<ul>\n<li>\n<p><em>LANGUAGE<\/em> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u044f\u0437\u044b\u043a, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c ChatGPT \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0430 \u043f\u0443\u043b\u043b \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0435. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 <a href=\"https:\/\/github.com\/anc95\/ChatGPT-CodeReview\/blob\/d2fc2179dd191966b40becf0d5cf19d397e7feca\/src\/chat.ts#L21\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0434<\/a>, \u0433\u0434\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f prompt \u0434\u043b\u044f chatGPT<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"typescript\">private generatePrompt = (patch: string) => {     const answerLanguage = process.env.LANGUAGE       ? `Answer me in ${process.env.LANGUAGE},`       : '';      const prompt =       process.env.PROMPT ||         'Below is a code patch, please help me do a brief code review on it. Any bug risks and\/or improvement suggestions are welcome:';      return `${prompt}, ${answerLanguage}:     ${patch}     `;   }; <\/code><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u043c\u043f\u0442\u0430 \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>PROMPT<\/em> (\u043e \u043d\u0435\u0439 \u043d\u0438\u0436\u0435) \u0432 \u043a\u043e\u043d\u0435\u0446 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e <em>Answer me in Russian<\/em>.<\/p>\n<ul>\n<li>\n<p><em>OPENAI_API_ENDPOINT<\/em> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u043e, \u043a\u0443\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441, \u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 <code>https:\/\/api.proxyapi.ru\/openai\/v1<\/code><\/p>\n<\/li>\n<li>\n<p><em>MODEL<\/em> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e ChatGPT, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u043c \u043e\u0442\u0432\u0435\u0442\u0438\u0442. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <em>gpt-3.5-turbo<\/em>, \u043d\u043e \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<\/li>\n<li>\n<p><em>PROMPT<\/em> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0430\u043c \u0437\u0430\u043f\u0440\u043e\u0441. \u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a \u043c\u043e\u0434\u0435\u043b\u0438 \u043a\u0430\u043a \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0447\u0430\u0442\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u0440\u043e\u0441\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u0440\u0435\u0432\u044c\u044e \u043a\u043e\u0434\u0430. \u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0434\u0438\u0444\u0444\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0443\u043b\u043b \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f workflow: <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/90\/rx\/qg\/90rxqgxdnqefikfz9yrbdgncixm.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/90\/rx\/qg\/90rxqgxdnqefikfz9yrbdgncixm.jpeg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f workflow ChatGPT \u043d\u0430\u043f\u0438\u0448\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0443\u043b\u043b \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0435: <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/dn\/ta\/8l\/dnta8l_1-gaa38wojmgu8lebaju.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/dn\/ta\/8l\/dnta8l_1-gaa38wojmgu8lebaju.jpeg\" data-blurred=\"true\"\/><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/791610\/\"> https:\/\/habr.com\/ru\/articles\/791610\/<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042f \u0440\u0435\u0448\u0438\u043b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0432\u043e\u0439 open source <a href=\"https:\/\/github.com\/Dankosik\/invest-api-java-sdk-starter\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0435\u043a\u0442<\/a> <em>ChatGPT<\/em> \u043a\u0430\u043a \u0440\u0435\u0432\u044c\u044e\u0435\u0440\u0430 \u043f\u0443\u043b\u043b \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0441\u0440\u0430\u0437\u0443 \u043c\u043e\u0433 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0435\u0447\u0430\u043a\u0442\u043a\u0438 \u0438 \u043c\u0435\u043b\u043a\u0438\u0435 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u043e\u0434\u0435. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u0437 \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432, \u043a\u0430\u0440\u0442 \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0412\u041f\u041d\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 ProxyAPI \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 <code>yml<\/code> \u0444\u0430\u0439\u043b \u0434\u043b\u044f <em>GitHub Actions<\/em>.<\/p>\n<h3>\u041d\u0430\u0447\u0430\u043b\u043e<\/h3>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0441 \u0447\u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0447\u0430\u0442\u044c &#8212; \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 <code>.github\/workflows\/cr.yml<\/code> \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0421\u0430\u043c\u043e \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"yaml\">name: Code Review  permissions:   contents: read   pull-requests: write  on:   pull_request:     types: [opened, reopened, synchronize]  jobs:   test:     runs-on: ubuntu-latest     steps:       - uses: anc95\/ChatGPT-CodeReview@v1.0.11         env:           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}           OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}           LANGUAGE: Russian           OPENAI_API_ENDPOINT: https:\/\/api.proxyapi.ru\/openai\/v1           MODEL: gpt-3.5-turbo           PROMPT: \"You are an experienced Kotlin\/Java developer and your job is to review pull requests. Please review the following code for any misunderstandings or violations. Don't spend time commenting on what is already working perfectly. I'm looking for constructive criticism and suggestions for improving the code, only useful and thorough notes.\" <\/code><\/pre>\n<p>\u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0438. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e \u0432\u0430\u0436\u043d\u044b\u0435.<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c action <code>- uses: anc95\/ChatGPT-CodeReview@v1.0.11<\/code> <a href=\"https:\/\/github.com\/anc95\/ChatGPT-CodeReview\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>.<\/p>\n<h3>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c \u044d\u0442\u043e\u0433\u043e action:<\/h3>\n<ul>\n<li>\n<p><em>GITHUB_TOKEN<\/em> \u043d\u0443\u0436\u0435\u043d \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 actions (\u043f\u0440\u043e <a href=\"https:\/\/docs.github.com\/en\/actions\/security-guides\/automatic-token-authentication\" rel=\"noopener noreferrer nofollow\">GITHUB_TOKEN<\/a>)<\/p>\n<\/li>\n<li>\n<p><em>OPENAI_API_KEY<\/em> &#8212; \u044d\u0442\u043e \u043a\u043b\u044e\u0447 OpenAI. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a OpenAI \u0438\u0437 \u0420\u0424, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u044e\u0447 \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 <a href=\"https:\/\/proxyapi.ru\/\" rel=\"noopener noreferrer nofollow\">ProxyAPI<\/a>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u0430\u0431\u0438\u043d\u0435\u0442 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u044e\u0447:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u043a\u0440\u0435\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c OPENAI_API_KEY (\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u0438\u043c\u044f) \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438: <\/p>\n<figure class=\"\"><\/figure>\n<figure class=\"\"><\/figure>\n<ul>\n<li>\n<p><em>LANGUAGE<\/em> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u044f\u0437\u044b\u043a, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c ChatGPT \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0430 \u043f\u0443\u043b\u043b \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0435. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 <a href=\"https:\/\/github.com\/anc95\/ChatGPT-CodeReview\/blob\/d2fc2179dd191966b40becf0d5cf19d397e7feca\/src\/chat.ts#L21\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0434<\/a>, \u0433\u0434\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f prompt \u0434\u043b\u044f chatGPT<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"typescript\">private generatePrompt = (patch: string) => {     const answerLanguage = process.env.LANGUAGE       ? `Answer me in ${process.env.LANGUAGE},`       : '';      const prompt =       process.env.PROMPT ||         'Below is a code patch, please help me do a brief code review on it. Any bug risks and\/or improvement suggestions are welcome:';      return `${prompt}, ${answerLanguage}:     ${patch}     `;   }; <\/code><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u043c\u043f\u0442\u0430 \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>PROMPT<\/em> (\u043e \u043d\u0435\u0439 \u043d\u0438\u0436\u0435) \u0432 \u043a\u043e\u043d\u0435\u0446 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e <em>Answer me in Russian<\/em>.<\/p>\n<ul>\n<li>\n<p><em>OPENAI_API_ENDPOINT<\/em> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u043e, \u043a\u0443\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441, \u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 <code>https:\/\/api.proxyapi.ru\/openai\/v1<\/code><\/p>\n<\/li>\n<li>\n<p><em>MODEL<\/em> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e ChatGPT, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u043c \u043e\u0442\u0432\u0435\u0442\u0438\u0442. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <em>gpt-3.5-turbo<\/em>, \u043d\u043e \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<\/li>\n<li>\n<p><em>PROMPT<\/em> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0430\u043c \u0437\u0430\u043f\u0440\u043e\u0441. \u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a \u043c\u043e\u0434\u0435\u043b\u0438 \u043a\u0430\u043a \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0447\u0430\u0442\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u0440\u043e\u0441\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u0440\u0435\u0432\u044c\u044e \u043a\u043e\u0434\u0430. \u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u0434\u0438\u0444\u0444\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0443\u043b\u043b \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f workflow: <\/p>\n<figure class=\"\"><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f workflow ChatGPT \u043d\u0430\u043f\u0438\u0448\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0443\u043b\u043b \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0435: <\/p>\n<figure class=\"\"><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/791610\/\"> https:\/\/habr.com\/ru\/articles\/791610\/<\/a><br \/><\/br><\/br><\/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-367402","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/367402","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=367402"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/367402\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=367402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=367402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=367402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}