How to 'Watch' only a directory in a GitHub repository?

一曲冷凌霜 提交于 2019-12-03 06:34:41

问题


For example, https://github.com/vanillaforums/Garden is the GitHub repository. But I only want to 'watch' this directory https://github.com/vanillaforums/Garden/tree/master/plugins in the repository.

How do I do that? There doesn't seem to be a way.


回答1:


I confirm that the "watch" feature on GitHub is at the repository level, not at the directory level.

For directory-level watching, you could implement it by, for instance, having a local process cloning, then pulling, that repo every x hours, checking the ls-tree of each new commit, and then sending you an email if an update in plugins is detected.




回答2:


I think a solution that's better than the suggestion above is to use the built-in github feature of rss feeds for any github paths. See Setting up an Github Commit RSS feed .

Using that you can set up an email alert using a service like https://blogtrottr.com/ to send you an email whenever the feed is updated.

Example: To watch this directory https://github.com/torvalds/linux/tree/master/Documentation use this atom feed https://github.com/torvalds/linux/commits/master/Documentation.atom




回答3:


I can't think of anything if you really need to watch a directory, but if you can get away with a single file I'm using http://www.changedetection.com/ on the raw view of the file in question. The directory view would probably change every time someone starred or watched the project, but a single file should be sufficient for a lot of people (especially with Makefile.am/CMakeLists.txt/etc. which list all subdirectories).

FWIW I'm going through an e-mail address generated by MaskMe and I haven't received any spam to that address after three months (the changedetection web site looks a bit sketchy, so I was worried).




回答4:


You could follow the commit page with some website that tracks changes on sites. For example I'm using Follow That Page for the history of a file on ActiveAdmin's github.



来源:https://stackoverflow.com/questions/9732779/how-to-watch-only-a-directory-in-a-github-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!