{"id":446736,"date":"2021-04-19T21:54:07","date_gmt":"2021-04-19T13:54:07","guid":{"rendered":"http:\/\/4563.org\/?p=446736"},"modified":"2021-04-19T21:54:07","modified_gmt":"2021-04-19T13:54:07","slug":"python-%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0-git-pull-%e6%8b%89%e5%8f%96-gitlab-%e4%b8%8a%e7%9a%84%e9%a1%b9%e7%9b%ae%e6%96%87%e4%bb%b6%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=446736","title":{"rendered":"Python \u600e\u4e48\u5b9e\u73b0 git pull \u62c9\u53d6 gitlab \u4e0a\u7684\u9879\u76ee\u6587\u4ef6\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Python \u600e\u4e48\u5b9e\u73b0 git pull \u62c9\u53d6 gitlab \u4e0a\u7684\u9879\u76ee\u6587\u4ef6\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zhoudaiyu <\/span>  <span><i><\/i> 9<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6bd4\u5982\u901a\u8fc7 web \u89e6\u53d1\uff0c\u4e3b\u52a8\u53bb gitlab \u62c9\u4ee3\u7801\uff0c\u548c\u672c\u5730\u6587\u4ef6\u540c\u6b65\uff0c\u53ea\u662f\u589e\u91cf\u66f4\u65b0\uff0c\u4e0d\u662f\u6587\u4ef6\u4e0b\u8f7d\u3002\u6211\u770b\u4e86\u770b http api \u6216\u8005 gitlab-python \u597d\u50cf\u90fd\u4e0d\u80fd\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\uff0c\u5927\u5bb6\u6709\u5565\u601d\u8def\u5417\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>4<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5635972\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Vegetable <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u963f\u8fd9\uff0c\u96be\u9053\u4e0d\u80fd\u8fd9\u6837\uff1f<br \/>os.system(&#8220;git pull&#8221;)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5635973\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wayslog <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             subprocess.check_call(shlex.split(&#8216;git pull &#8230;.&#8217;))                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5635974\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Misakas <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             os.system(&#8220;cd \/home\/workspace\/ &amp;&amp; git pull &#8220;)\u3002\u4e0a\u7684\u90fd\u4e0d\u4e25\u8c28\uff08\u72d7\u5934                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5635975\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tingyunsay <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             import commands<br \/>commands.getstatusoutput(&#8220;\/usr\/bin\/git pull&#8221;)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Python \u600e\u4e48\u5b9e\u73b0 git p&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/446736"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=446736"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/446736\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=446736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=446736"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=446736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}