{"id":126,"date":"2018-05-08T16:43:31","date_gmt":"2018-05-08T13:43:31","guid":{"rendered":"https:\/\/qwertys.ru\/?p=126"},"modified":"2018-05-13T01:50:29","modified_gmt":"2018-05-12T22:50:29","slug":"%d0%9e%d0%b1%d0%bd%d0%be%d0%b2%d0%bb%d0%b5%d0%bd%d0%b8%d0%b5-pull-request-%d0%b2-drone-ci","status":"publish","type":"post","link":"https:\/\/qwertys.ru\/?p=126","title":{"rendered":"\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 Pull Request \u0432 Drone CI"},"content":{"rendered":"<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u0443 drone.io \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c &#8212; \u043e\u043d \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 Pull Request \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0432 \u0441\u043b\u0438\u044f\u0435\u043c\u044b\u0445 \u0432\u0435\u0442\u043a\u0430\u0445. \u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u0445\u0443\u043a\u0430 \u043e\u0442 SCM \u043e\u043d \u0437\u0430\u043d\u043e\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u0441\u043e \u0441\u0442\u0430\u0440\u044b\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c.<br \/>\n<!--more--><\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c Drone \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c PR, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e pipeline \u0432 .drone.yml \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0442\u0435\u043a\u0441\u0442:<\/p>\n<pre class=\"code_block\">  update_pr:\r\n    image: plugins\/git\r\n    commands:\r\n    - export BRANCH_SRC=origin\/${DRONE_COMMIT_REFSPEC%%:*} BRANCH_DST=origin\/${DRONE_BRANCH}\r\n    - cp -rpf .git .git.bak\r\n    - git fetch &amp;&amp; git checkout $BRANCH_SRC &amp;&amp; git merge --no-commit $BRANCH_DST\r\n    - rm -rf .git &amp;&amp; mv -f .git.bak .git\r\n    when:\r\n      event: pull_request\r\n<\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0441\u043d\u0438\u043f\u043f\u0435\u0442 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442, \u0447\u0442\u043e remote \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f origin (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u0443 drone.io \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c &#8212; \u043e\u043d \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 Pull Request \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0432 \u0441\u043b\u0438\u044f\u0435\u043c\u044b\u0445 \u0432\u0435\u0442\u043a\u0430\u0445. \u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u0445\u0443\u043a\u0430 \u043e\u0442 SCM \u043e\u043d \u0437\u0430\u043d\u043e\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u0441\u043e \u0441\u0442\u0430\u0440\u044b\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[24,25,4],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/qwertys.ru\/index.php?rest_route=\/wp\/v2\/posts\/126"}],"collection":[{"href":"https:\/\/qwertys.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qwertys.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qwertys.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qwertys.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=126"}],"version-history":[{"count":3,"href":"https:\/\/qwertys.ru\/index.php?rest_route=\/wp\/v2\/posts\/126\/revisions"}],"predecessor-version":[{"id":130,"href":"https:\/\/qwertys.ru\/index.php?rest_route=\/wp\/v2\/posts\/126\/revisions\/130"}],"wp:attachment":[{"href":"https:\/\/qwertys.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qwertys.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qwertys.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}