Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何自动初始化 Gitalk/Gitment 评论 #91

Open
draveness opened this issue Oct 28, 2017 · 35 comments
Open

如何自动初始化 Gitalk/Gitment 评论 #91

draveness opened this issue Oct 28, 2017 · 35 comments

Comments

@draveness
Copy link
Owner

@draveness draveness commented Oct 28, 2017

https://draveness.me/git-comments-initialize

昨天将博客的评论迁移到了 Gitalk,最开始选择了使用 Gitment 作为评论系统,但是由于其开发者很久没有维护、代码七个月也没有更新,所以就选择了有更多人维护的 Gitalk 作为目前博客的评论系统。无论是 Gitalk 还是 Gitment 都只能手动初始化所有文章的评论或者一个一个点开界面,作者觉得这件事情非常麻烦,所以手动抓了一下 Gitalk 和 Gitment 在初始化评论时发出的网络请求后写了一个用于自动化初始评论的脚本。

@Desgard

This comment has been minimized.

Copy link

@Desgard Desgard commented Oct 28, 2017

学习到这个姿势了。

@draveness

This comment has been minimized.

Copy link
Owner Author

@draveness draveness commented Oct 28, 2017

@Desgard 还是不是美滋滋

@draveness draveness added gitment Blog and removed gitment labels Oct 29, 2017
@yunisSong

This comment has been minimized.

Copy link

@yunisSong yunisSong commented Oct 30, 2017

6666

@draveness draveness added gitment and removed gitment labels Oct 31, 2017
@CrazyWr

This comment has been minimized.

Copy link

@CrazyWr CrazyWr commented Dec 21, 2017

脚本变量上下不一致 new_token token
不过倒不是什么大事
谢过脚本

@draveness

This comment has been minimized.

Copy link
Owner Author

@draveness draveness commented Dec 21, 2017

@CrazyWr
脚本变量上下不一致 new_token token
不过倒不是什么大事
谢过脚本

我一会改一下吧

@heroydx

This comment has been minimized.

Copy link

@heroydx heroydx commented Feb 11, 2018

请问老师,出现Error: Validation Failed.要怎么修改一下啊。。。

@qinyuanpei

This comment has been minimized.

Copy link

@qinyuanpei qinyuanpei commented Feb 26, 2018

请问这个token是从Github的Setting里获得的Personal Access Token吗?

@noname007

This comment has been minimized.

Copy link

@noname007 noname007 commented Mar 5, 2018

hhaddd

@zouyaoji

This comment has been minimized.

Copy link

@zouyaoji zouyaoji commented Mar 9, 2018

报错

很气啊,我的就报这个错,请问博主知道咋回事吗?

@taoyouxian

This comment has been minimized.

Copy link

@taoyouxian taoyouxian commented Apr 5, 2018

在使用ruby脚本时出现“{"message":"Validation Failed"”,请问有什么问题吗?

@draveness

This comment has been minimized.

Copy link
Owner Author

@draveness draveness commented Apr 8, 2018

@taoyouxian

@draveness

@CrazyWr
脚本变量上下不一致 new_token token
不过倒不是什么大事
谢过脚本

我一会改一下吧

你好,请问你那边是成功了吗? 我这边报错“Validation Failed”

肯定成功了。。不然我发上来干啥

@iarchean

This comment has been minimized.

Copy link

@iarchean iarchean commented Apr 26, 2018

这个很不错,谢谢。

@xuepro

This comment has been minimized.

Copy link

@xuepro xuepro commented Apr 27, 2018

博主的文章说的不清楚,看来根本不知道怎么说

@qinyuanpei

This comment has been minimized.

Copy link

@qinyuanpei qinyuanpei commented Apr 27, 2018

你们这是有多菜啊,天天说这个问题,首先,在个人设置里创建一个token,记下关键的clientId和secretKey,因为这个信息只会显示一次,然后初始化评论不就是创建一个issue吗?参考Github API v3:https://developer.github.com/v3/issues/#create-an-issue,你发现这里需要一个title和body,tag这个参数可选,但GitmentG和Gitalk都自己定义了一个相对应的tag,这是为了在加载评论时起到一个过滤条件的作用,clientId和secretKey怎么用文档里都介绍得非常清楚,需要注意的是token要要加在header上,格式是:token xxxxxxxxxxxxx,我曾经尝试过hexo g的时候,自己去初始化,然后将issueNumber记录到博客的fontmatter里,后来发现github对API调用次数做了限制,可能所有静态页面都生成了,这个API都还没有调完,nodejs里还需要处理Gzip的坑……总之,折腾不出来就不要折腾了,你以为会有谁给你评论吗?很多时候,博客都是写给我们自己看的,抱歉,我不想再收到这个邮件了,更不要来问我具体怎么弄,谢谢!

@bingyuea

This comment has been minimized.

Copy link

@bingyuea bingyuea commented May 6, 2018

翻到最后一个评论恍然大悟

@bingyuea

This comment has been minimized.

Copy link

@bingyuea bingyuea commented May 6, 2018

哈哈

@xumeng

This comment has been minimized.

Copy link

@xumeng xumeng commented May 10, 2018

@heroydx
请问老师,出现Error: Validation Failed.要怎么修改一下啊。。。
有个办法:改下代码截取url一部分,不超过50个字符即可。
具体可参考http://amonxu.com/2018/05/10/Hello-Gitment/

@xumeng

This comment has been minimized.

Copy link

@xumeng xumeng commented May 10, 2018

@taoyouxian
在使用ruby脚本时出现“{"message":"Validation Failed"”,请问有什么问题吗?
有个办法:改下代码截取url一部分,不超过50个字符即可。
具体可参考http://amonxu.com/2018/05/10/Hello-Gitment/

@xumeng

This comment has been minimized.

Copy link

@xumeng xumeng commented May 10, 2018

非常感谢博主提供的脚本,帮了大忙。致敬!

@ripperhe

This comment has been minimized.

Copy link

@ripperhe ripperhe commented Jun 2, 2018

额额额额 可以的

@xigrug

This comment has been minimized.

Copy link

@xigrug xigrug commented Jun 22, 2018

还是不太明白

@ShixiangWang

This comment has been minimized.

Copy link

@ShixiangWang ShixiangWang commented Jul 24, 2018

可以应用到hugo发布的博客吗?

@ibambooooo

This comment has been minimized.

Copy link

@ibambooooo ibambooooo commented Jul 24, 2018

xuexi

@chenjiancan

This comment has been minimized.

Copy link

@chenjiancan chenjiancan commented Aug 12, 2018

原来如此

@ly918

This comment has been minimized.

Copy link

@ly918 ly918 commented Oct 16, 2018

MARK

@achuanya

This comment has been minimized.

Copy link

@achuanya achuanya commented Nov 17, 2018

登录速度限制了怎么办.... www.achuan.io

@zexuneu

This comment has been minimized.

Copy link

@zexuneu zexuneu commented Nov 20, 2018

mark,,,

@JustDoDT

This comment has been minimized.

Copy link

@JustDoDT JustDoDT commented Mar 21, 2019

不错

@mortyo

This comment has been minimized.

Copy link

@mortyo mortyo commented May 2, 2019

迭代

@GODGQC

This comment has been minimized.

Copy link

@GODGQC GODGQC commented May 20, 2019

666

@GODGQC

This comment has been minimized.

Copy link

@GODGQC GODGQC commented May 20, 2019

好厉害

@draveness

This comment has been minimized.

Copy link
Owner Author

@draveness draveness commented Jun 20, 2019

@wjup test

你在干啥??

Repository owner deleted a comment from wjup Jun 20, 2019
Repository owner deleted a comment from wjup Jun 20, 2019
Repository owner deleted a comment from wjup Jun 20, 2019
Repository owner deleted a comment from wjup Jun 20, 2019
Repository owner deleted a comment from yangchaoy Jun 25, 2019
Repository owner deleted a comment from wjup Jun 25, 2019
Repository owner deleted a comment from yangchaoy Jun 25, 2019
Repository owner deleted a comment from wjup Jun 25, 2019
@huris

This comment has been minimized.

Copy link

@huris huris commented Aug 1, 2019

学习了,谢谢

@muziapple

This comment has been minimized.

Copy link

@muziapple muziapple commented Aug 17, 2019

GitHub 中 issue 的可以创建但是并不能删除

是可以删除的,点进issue有个"Delete issue"

@draveness

This comment has been minimized.

Copy link
Owner Author

@draveness draveness commented Aug 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.