{"id":86891,"date":"2024-01-12T09:53:10","date_gmt":"2024-01-12T01:53:10","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=86891"},"modified":"2024-01-12T09:53:11","modified_gmt":"2024-01-12T01:53:11","slug":"gitment-github-issues","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/gitment-github-issues.html","title":{"rendered":"Gitment \u57fa\u4e8e Github \u7684 Issues \u5b9e\u73b0\u7684\u8bc4\u8bba\u63d2\u4ef6"},"content":{"rendered":"

\"\"<\/p>\n

\u6700\u8fd1\u53d1\u73b0\u4e86\u4e00\u4e2a\u6709\u610f\u601d\u7684\u8bc4\u8bba\u63d2\u4ef6\u00a0Gitment<\/a>[1]<\/span>\uff0c\u4ece\u5b9e\u73b0\u548c\u6548\u679c\u4e0a\u90fd\u4e0d\u9519\uff0c\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u4e00\u4e0b<\/a>[2]<\/span>\u3002\u5982\u679c\u4f60\u6709\u4e2a\u4eba\u535a\u5ba2\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\uff1b\u5982\u679c\u4f60\u6ca1\u6709\u4e2a\u4eba\u535a\u5ba2\uff0c\u4e5f\u53ef\u4ee5\u4e86\u89e3\u4e0b\u5b9e\u73b0\u7684\u601d\u8def\uff0c\u5f00\u5f00\u8111\u6d1e\u3002<\/p>\n

\u4e4b\u524d\u666e\u904d\u4f7f\u7528\u7684\u591a\u8bf4\u8bc4\u8bba\u5173\u95ed\u4e86\uff0c\u76f8\u4fe1\u5f88\u591a\u4eba\u7684\u535a\u5ba2\u90fd\u53d7\u5230\u4e86\u5f71\u54cd\u3002\u6211\u4e2a\u4eba\u7684\u535a\u5ba2\u8bc4\u8bba\u4e5f\u56e0\u6b64\u6362\u8fc7 Discuz\u3001\u7f51\u6613\u8bc4\u8bba\u63d2\u4ef6\u3001\u7545\u8a00\u8bc4\u8bba\u63d2\u4ef6\uff0c\u90fd\u4e0d\u751a\u7406\u60f3\u3002\u8fd9\u6b21\u770b\u5230 Gitment \u8fd8\u662f\u6709\u4e9b\u60ca\u559c\u3002<\/p>\n

\u5b9e\u73b0\u7684\u6700\u7ec8\u6548\u679c\u5982\u56fe\uff1a<\/p>\n

\"\"<\/p>\n

\u57fa\u672c\u539f\u7406\u662f\u5229\u7528 GitHub \u9879\u76ee\u4e0a\u7684 Issues \u529f\u80fd\u6765\u5b9e\u73b0\u5185\u5bb9\u7684\u5b58\u50a8\uff0c\u4f7f\u7528 GitHub \u7684\u8d26\u53f7\u767b\u5f55\u4f53\u7cfb\u3002\u548c\u81ea\u5df1\u7684\u535a\u5ba2\u96c6\u6210\u8d77\u6765\u4e5f\u6bd4\u8f83\u7b80\u5355\uff0c\u4e00\u4e2a css \u6587\u4ef6\uff0c\u4e00\u4e2a js \u6587\u4ef6\uff0c\u4e00\u6bb5\u521d\u59cb\u5316\u4ee3\u7801\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n

1\u3001\u9996\u5148 Github \u4e0a\uff0c\u6ce8\u518c OAuth Application<\/strong><\/div>\n

\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e2a\u5730\u5740<\/a>[3]<\/span>\u6765\u6ce8\u518c\u4e00\u4e2a\u5e94\u7528\uff0c\u6309\u63d0\u793a\u586b\u5199\u5373\u53ef\u3002<\/p>\n

\"\"<\/p>\n

\u6210\u529f\u4e4b\u540e\u4f1a\u5f97\u5230\u4e00\u4e2a client ID \u548c\u4e00\u4e2a client secret\uff0c\u5728\u540e\u9762\u7684\u521d\u59cb\u5316\u63d2\u4ef6\u65f6\u4f1a\u7528\u5230\u3002<\/p>\n

\"\"<\/p>\n

2\u3001\u9875\u9762\u96c6\u6210 Gitment<\/strong><\/div>\n

\u52a0\u8f7d\u5bf9\u5e94\u7684 css \u6587\u4ef6\u3001js \u6587\u4ef6\u3001\u521d\u59cb\u5316\u4ee3\u7801\u5230\u8981\u663e\u793a\u7684\u9875\u9762\uff1a<\/p>\n

<div id=\"container\"><\/div>\r\n<link rel=\"stylesheet\" href=\"https:\/\/imsun.github.io\/gitment\/style\/default.css\">\r\n<script src=\"https:\/\/imsun.github.io\/gitment\/dist\/gitment.browser.js\"><\/script>\r\n<script>\r\n    var gitment = new Gitment({\r\n        id: '\u9875\u9762 ID', \/\/ \u53ef\u9009\u3002\u8fd9\u4e2a\u9009\u9879\u4e0d\u5199\uff08\u4e0d\u662f\u7559\u7a7a\uff09\uff0c\u9ed8\u8ba4\u4e3a location.href\r\n        owner: '\u4f60\u7684 GitHub ID',\r\n        repo: '\u5b58\u50a8\u8bc4\u8bba\u7684 repo',\r\n        oauth: {\r\n            client_id: '\u4f60\u7684 client ID',\r\n            client_secret: '\u4f60\u7684 client secret',\r\n        },\r\n     });\r\n    gitment.render('container'); \/\/container\u4e3a\u4f60\u8981\u663e\u793a\u8bc4\u8bba\u7684id\r\n<\/script>\r\n<\/pre>\n

\u5173\u4e8e\u521d\u59cb\u5316\u90e8\u5206\u7684\u53c2\u6570\u66f4\u591a\u8bf4\u660e\uff0c\u53ef\u53c2\u770b<\/p>\n

https:\/\/github.com\/imsun\/gitment#options<\/a><\/p><\/blockquote>\n

\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898\u4e00<\/strong><\/span><\/div>\n

\"\"<\/p>\n

\u5982\u679c\u4f60\u9047\u5230\u8fd9\u6837\u7684\u62a5\u9519\uff0c\u8bf4\u660e\u4f60\u7684 gitment.render('container');<\/span>\u00a0\u91cc\u7684 container<\/span> \u5728\u9875\u9762\u4e0a\u6ca1\u6709\u5bf9\u5e94\u4e0a\uff0c\u8bf7\u4ed4\u7ec6\u68c0\u67e5\u3002<\/p>\n

\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898\u4e8c<\/strong><\/span><\/div>\n

\"\"<\/p>\n

\u5982\u679c\u9047\u5230\u8fd9\u6837\u7684\u95ee\u9898\uff0c\u5f88\u53ef\u80fd\u662f\u4f60\u521d\u59cb\u5316\u7684 repo \u5730\u5740\u6ca1\u6709\u5199\u5bf9\uff0crepo \u4e00\u5b9a\u8981\u5199\u6210\u5bf9\u5e94\u7684 id\uff0c\u800c\u4e0d\u662f http \u7684\u5730\u5740\uff0c\u56fe\u4e2d\u7684 id \u662f\u6211\u81ea\u5df1 GitHub \u4e0a\u7684\u4e00\u4e2a\u9879\u76ee\uff0c\u4e5f\u5c31\u662f\u8981\u5b58\u50a8\u8bc4\u8bba\u5185\u5bb9\u7684\u9879\u76ee\uff0c\u5982\u56fe\uff1a<\/p>\n

\"\"<\/p>\n

3\u3001\u521d\u59cb\u5316\u8bc4\u8bba<\/strong><\/div>\n

\u96c6\u6210\u6210\u529f\u540e\u4f60\u5c31\u53ef\u4ee5\u770b\u89c1\u663e\u793a\u7684\u8bc4\u8bba\u63d2\u4ef6\u5185\u5bb9\u4e86\u3002\u8fd9\u65f6\u5019\u8fd8\u9700\u8981\u4e00\u6b65\u5c31\u662f\u767b\u9646\u81ea\u5df1\u7684 GitHub \u8d26\u53f7\uff0c\u70b9\u51fb\u56fe\u4e2d\u7684 \u201cInitilize Comments \u201d\u3002<\/p>\n

\"\"<\/p>\n

\u6ce8\u610f\uff1a\u6bcf\u4e00\u7bc7\u6587\u7ae0\u90fd\u9700\u8981\u521d\u59cb\u5316<\/p><\/blockquote>\n

\u6700\u540e\u4f60\u53ef\u4ee5\u5728 Issues \u90e8\u5206\u770b\u5230\u7684\u8bc4\u8bba\u5b58\u50a8\u4e3a\uff1a<\/p>\n

\"\"<\/p>\n

4\u3001\u81ea\u5b9a\u4e49\u548c\u4e2a\u6027\u5316<\/strong><\/div>\n

\u4f60\u4e5f\u53ef\u4ee5\u81ea\u5b9a\u4e49\u6837\u5f0f\u548c\u5e03\u5c40\uff0c\u66f4\u591a\u8bf4\u660e\u8bf7\u53c2\u8003\uff1ahttps:\/\/github.com\/imsun\/gitment#customize<\/a><\/p>\n

\u6700\u540e\u603b\u7ed3\u4e00\u4e0b\uff0c\u8fd9\u6b3e Gitment \u7684\u4f18\u70b9\u662f\u96c6\u6210\u7b80\u5355\uff0c\u81ea\u5b9a\u4e49\u6bd4\u8f83\u65b9\u4fbf\uff0c\u81ea\u5e26 GitHub \u8d26\u53f7\u767b\u5f55\uff1b\u7f3a\u70b9\u5c31\u662f\u4ec5\u652f\u6301 GitHub \u8d26\u53f7\u767b\u5f55\uff0c\u6bcf\u6b21\u53d1\u5e03\u7684\u65b0\u6587\u7ae0\u8981\u70b9\u51fb\u6309\u94ae\u6765\u521d\u59cb\u5316\uff0c\u7565\u9ebb\u70e6\uff1b\u76ee\u524d\u624b\u673a\u7aef\u9002\u914d\u8fd8\u5e76\u4e0d\u7406\u60f3\u3002\u5982\u679c\u4f60\u5bf9\u8bc4\u8bba\u63d2\u4ef6\u7684\u8981\u6c42\u4e0d\u662f\u90a3\u4e48\u4e25\u683c\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u8fd9\u6b3e\u63d2\u4ef6\u3002<\/p>\n

GitHub \u9879\u76ee\u6e90\u7801\uff1ahttps:\/\/github.com\/imsun\/gitment<\/a><\/p><\/blockquote>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-9018-1.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/gitment-github-issues.html<\/a>\u7f16\u8f91\uff1a\u9004\u589e\u5b9d\uff0c\u5ba1\u6838\u5458\uff1a\u5218\u9044<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u6700\u8fd1\u53d1\u73b0\u4e86\u4e00\u4e2a\u6709\u610f\u601d\u7684\u8bc4\u8bba\u63d2\u4ef6\u00a0Gitment[1]\uff0c\u4ece\u5b9e\u73b0\u548c\u6548\u679c\u4e0a\u90fd\u4e0d\u9519\uff0c\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u4e00\u4e0b[2]\u3002\u5982\u679c\u4f60\u6709\u4e2a\u4eba […]<\/p>\n","protected":false},"author":309,"featured_media":86906,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-86891","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/86891","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=86891"}],"version-history":[{"count":6,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/86891\/revisions"}],"predecessor-version":[{"id":86907,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/86891\/revisions\/86907"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/86906"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=86891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=86891"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=86891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}