Comments (12)
建议升级一下版本试一下,然后最好提供一下复现repo,不然光这么说也不好确认是什么问题
from vssue.
关于版本我看了 vssue
组件里面代码 onTitleChange
onOptionsChange
onIssueIdChange
的确都没有再调用 init()
的方法,另 测试 repo:
vuepress - https://github.com/Ancientwood/vssue-test
静态页面 - https://github.com/Ancientwood/vssue-test-blog
访问地址 - http://vssue.ancientwood.club/
然后尴尬的是结果我这个测试的repo并没有复现...(我复制了原来的项目然后删掉了所有文章
然后我测试了有问题的repo,vssue 重复创建的情况只在第52篇post之后...
from vssue.
把post全部加回去,开始重复创建了。
https://github.com/Ancientwood/vssue-test/issues
from vssue.
是不是无限重复创建。。。如果是的话,我一直没做处理的问题可能暴露了:sweat_smile:
from vssue.
是无限重复...
from vssue.
这就要说到 Github API 有多么坑爹了……
GitHub 没有提供根据标题查找 issue 的 API,现在的做法是把 issues 列表取下来然后用 js 筛选里面的标题,然后每次取下来的 issues 数量其实有限,现在看来应该是50个……
from vssue.
所以用 title 的话就是用 list-issues-for-a-repository 这个 api 遍历
https://developer.github.com/v3/issues/#list-issues-for-a-repository
这个...好像...没有...分页...
而用 issue id 的话就是用 get-a-single-issue
https://developer.github.com/v3/issues/#get-a-single-issue
所以同一个 id 总能找到不会重复创建对吧
from vssue.
目前是这样的。我刚去看了一眼 gitment 和 gitalk ,他们居然是用一个单独的 label 当 id 😅
我开发完 vssue 最大的感觉就是 Github 的 API 真的辣鸡……
from vssue.
Github 的分页非常不好使 https://developer.github.com/v3/#pagination
from vssue.
莫名想到,init的时候创建一个 issue id 为1的 issue,在里面维护所有自动创建了的issue的列表 :(
from vssue.
现在想到的解决方案:
-
在 GitHub 中像 gitment 和 gitalk 那样用 label 作为 id (#25),但是会导致现在已经在用 Vssue + GitHub 的项目重新生成 issues 或者手动补充上 label,算是某种 breaking changes。
-
在文档里写清楚 GitHub 存在这个问题,然后建议用手动给 options 传入 labels 的方式来解决。
from vssue.
还是决定不引入 breaking changes 了……于是这个问题其实还是应该挪到主题下面解决,哈哈
from vssue.
Related Issues (20)
- [Question] 设置了autoCreateIssue=true,点击创建issue 会显示评论加载失败,评论框无法输入 HOT 1
- 什么时候支持 vuepress2? HOT 2
- [Question] How to integrate with Vitepress? HOT 2
- 一切配置正常后页面无法评论 HOT 3
- [Feature Request] Add a hook that can modify then oauth url query params
- [Question] 可以登录,无法评论 HOT 2
- [Question] Vssue样式不对? HOT 1
- 请问github.io的pages无法使用吗 HOT 1
- 请教一下有没有从gitalk迁移到vssue的相关文档 HOT 2
- [Feature Request] MathJax rendering HOT 1
- vuepress 2.2 什么时候支持呢[Question] HOT 1
- [Bug Report] gitee 用不了 HOT 1
- [Bug Report] 用了gitee,github都不行,没什么用。 HOT 1
- [Feature Request] 大佬,能否考虑加个“收到新评论后邮件提醒”的功能? HOT 1
- gitlab cant work when i click new issue[Bug Report]
- [Bug Report] Vue url 404
- [Feature Request] 能否添加对文章的点赞功能
- [Feature Request] Add configurable Gitea instances
- [Bug Report] Vssue is not defined HOT 1
- how can vitepress use vssue smoothly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vssue.