简体   繁体   English

github标签api没有列出我存储库中的所有标签

[英]github labels api doesn't list all the labels in my repository

I've created around 47 labels in my github repository. 我在github存储库中创建了约47个标签。 But when I tried to list the labels using curl (github api), I get only 30 labels. 但是,当我尝试使用curl (github api)列出标签时,我只有30个标签。 Adding &per_page=100 doesn't seem to be working in this case. 在这种情况下,添加&per_page=100似乎无效。 Is there any solution to list all the labels ? 有列出所有标签的解决方案吗?

Appreciate your help. 感谢您的帮助。 thanks ! 谢谢 !

You will need to use pagination to traverse pst the first page of results. 您将需要使用分页遍历结果的第一页。 Check out https://developer.github.com/guides/traversing-with-pagination/ , especially this point: 查看https://developer.github.com/guides/traversing-with-pagination/ ,特别是这一点:

For technical reasons, not every endpoint behaves the same. 由于技术原因,并非每个端点的行为都相同。 For example, events won't let you set a maximum for items to receive. 例如,事件不允许您设置要接收的项目的最大值。 Be sure to read the documentation on how to handle paginated results for specific endpoints. 确保阅读有关如何处理特定端点的分页结果的文档。

Especially on that page, also look under the heading " Navigating through the pages " though in your case, I would jump to page 2, not 14 like in the example. 特别是在该页面上,也可以在“ 导航页面 ”标题下查看,尽管在您的情况下,我将跳至页面2,而不是示例中的14。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM