GitLab 如何通过 WebHook 获取单次 Push 的所有 Commit (超过 20 条)?

2019-11-18 14:38:26 +08:00
 andj4cn

如题,需要对所有的代码 commit 进行规范审查,但是 WebHook 有限制:

Note: When more than 20 commits are pushed at once, the commits web hook attribute will only contain the first 20 for performance reasons. Loading detailed commit data is expensive. Note that despite only 20 commits being present in the commits attribute, the total_commits_count attribute will contain the actual total.

有用过这个接口的老哥吗?讨教一下经验,怎么处理这种情况。

4260 次点击
所在节点    GitLab
4 条回复
phy25
2019-11-18 14:45:15 +08:00
andj4cn
2019-11-18 14:54:48 +08:00
@phy25 我看了下他们的讨论,好像没有给出具体的解决方案。。只是说到底该不该因为性能问题做出限制
andj4cn
2019-11-18 14:55:46 +08:00
@phy25 我想知道有没有其他的解决办法,WebHook 这一条路应该是走不通了
phy25
2020-01-02 01:47:05 +08:00
@andj4cn #2 "could share a bit more about how you're using the web hook? Improving the API might be a simper solution." 建议直接去那边回复。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/620664

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX