On Fri, Nov 06, 2020 at 09:22:10AM +0800, Lin Jiaxin wrote:
+# main thread +class MirrorMain
- def check_git_repo(git_repo, webhook_url)
- return @git_info.key?(git_repo) && Array(@git_info[git_repo]['url'])[0] == webhook_url
- end
blank line here.
Yes, a blank here makes it looks better.
Thanks, Yuanchao
Thanks, Jiaxin
- # example
- # url: https://gitee.com/theprocess/oec-hardware git_repo: oec-hardware/oec-hardware
- # url: https://github.com/berkeley-abc/abc git_repo: a/abc/abc
- # url: https://github.com/Siguyi/AvxToNeon git_repo: AvxToNeon/Siguyi
- def get_git_repo(webhook_url)
- strings = webhook_url.split('/')
- project = strings[-1]
- fork_name = strings[-2]