5 ms·
Get notified when a file on GitHub has changed
- mkurz 6y agoIf you use an rss reader, the easies solution how to track a file or a folder in GitHub is by just adding .atom at the end of the url when looking at the commits. For example: https://github.com/playframework/playframework/commits/master/core/play/src/main/scala/play/api/Play.scala https://github.com/playframework/playframework/commits/maste... becomes https://github.com/playframework/playframework/commits/master/core/play/src/main/scala/play/api/Play.scala.atom https://github.com/playframework/playframework/commits/maste... You can do that with every commit url in GitHub, be it for a folder or a file. Just add it to your rss feed reader, done.
- pibefision 6y agothank you! I really like this approach and didn't knew it was working well.
- brunoqc 6y agoYep, this is the simplest solution.
- waldekm 6y agoNice! Thanks for sharing!
- muthuraj57 6y agoYeah, it is super handy. I routinely do this for Changelog files from the libraries I use.
- mashaole 6y agoYou can just create a channel in discord and create a webhook for it then add that webhook to your GitHub repo on the settings(content-type should be Jain) then immediately when any change happens you’ll be notified
- kreeben 6y agoI like, nay, love, the fact the word "just" is so prominent in the description of your solution.
- slowhand09 6y ago...considering building a "just" expander that shows all the steps required to "just" do anything.
- xkeysc0re 6y agoI mean...it is just three steps involving some clicks and no code. I think that fits the bar for "just"
- mdaniel 6y agowith the small asterisk that this mechanism only works for repos where one has sufficient privileges to be able to create a webhook, and that doesn't square up with the original title of "a file on GitHub"
- kevincox 6y agoI think this only works if you have admin on the repo.
- st0le 6y agoWell, the solution includes filtering down to specific files. "any change" might just be noise.
- sneak 6y agoThe solution to GitHub (Microsoft) dominance is never to further lock oneself into Azure (Microsoft) proprietary tools. This is an ad. Posting it on a personal blog domain is dishonest.
- moontear 6y agoHow is this related to getting notified on GitHub file changes? Wouldn't you agree that any Microsoft-dominance discussion would be rather off-topic here?
- hoppyhoppy2 6y agoGitHub is owned by Microsoft.
- therealmarv 6y agoI always forget that fact...
- lcfcjs 6y agoDid you read the article? It talks about setting up a "Logic App" to send the notification. A Logic App is one of those awful visual "apps" that non-programmers can use, exclusive to Azure.
- sneak 6y agoThe article opens with the following line: > With more and more content being hosted on GitHub it's a shame that you can't get notified when a particular file has changed. GitHub is a Microsoft website.
- qkeast 6y agoMy team’s been working on a new feature in Sourcegraph called code monitoring that can do things like this (and a whole lot more) with our search query language. It’s pretty simple: 1. Customise our starting point with the file of your choice: https://docs.sourcegraph.com/code_monitoring/how-tos/starting_points#get-notified-when-a-file-changes https://docs.sourcegraph.com/code_monitoring/how-tos/startin... 2. Create a new code monitor at https://sourcegraph.com/code-monitoring https://sourcegraph.com/code-monitoring Whenever the file changes, you’ll get an email notification.
- omneity 6y agoIt’s exactly for this kind of situations that we built Monitoro[0]. We believe it shouldn’t take hours and so much code to get such a simple change notifier working. You can not only build a tracker like in TFA in minutes and without code, but also track any website (not just github), send alerts to any chat software, so MS Teams, Slack, Discord... and more importantly receive a specific info from the page. For example, the author of the last change, the code at line X etc... Disclaimer: I’m the founder. [0]: https://monitoro.xyz https://monitoro.xyz
- therealmarv 6y agoWould not a web page notifier which watches the RAW version for changes would do the job? And by the way: What is a good service for that? All services I used in the past have stopped providing that service. Last one I used was http://changedetection.com/ http://changedetection.com/ but it stopped its service.
- amelius 6y agoDoes this use polling? And won't this cause problems?
- ben509 6y agoYes, it uses polling. The only problem is the standard one for polling: it's either expensive or slow. > The function app hosts the scheduled process that at the specified time retrieves the list of files from the storage account (1), iterates through them, for each (2) one checks if it changed and sends a notification if it did (3). If the file has changed, the function app also updates the file hash in the storage account (4). The cheaper way to do it would be to set up a webhook listening for push events [1]. You do have to handle missed webhook notifications, but you can usually just do that by polling very infrequently. [1]: https://docs.github.com/en/developers/webhooks-and-events/github-event-types#pushevent https://docs.github.com/en/developers/webhooks-and-events/gi...
- sli 6y agoYou can't setup webhooks in someone else's project, though. Polling (or the atom solution in the comment section[0]) lets you react to changes in any project. 0: https://news.ycombinator.com/item?id=25903821 https://news.ycombinator.com/item?id=25903821
- ben509 6y agoFair point re webhooks, though you could ask the owners for it. The atom solution is nicer, and I'd probably do it even if I owned the project, but it's still just polling. It always bugs me that everything distributed inevitably devolves into polling...
- amelius 6y ago> The only problem is the standard one for polling: it's either expensive or slow. How about the problem of being banned by the service which is being polled?
- 6y ago
- jongleberry 6y agoYou can set up a GitHub Action that performs an action on any push to master/main (or any branch). You can also only perform the action when specific files are changed: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths https://docs.github.com/en/actions/reference/workflow-syntax.... This shouldn't require admin access, assuming admins allow you to use GitHub Actions. I generally don't bother looking at master/main for code changes unless there's something I'm looking for specifically. I set up CODEOWNERS so that teams get notified when their files are changed in PRs - this is how I get notified of potential changes to files that I care about.
- peterwallhead 6y agoIf you use https://larder.io/ https://larder.io/ with GitHub star sync enabled you can get weekly emails for new release notes. While it doesn't replicate the functionality demonstrated here, it's still a cool tool.
- sbs2001 6y agoShameless plug: I developed GitEye which does exactly this. It's a chrome extension which adds a watch button for every file. When the "watched" file is changed, the user receives an email. Check it here https://gitteye.herokuapp.com/ https://gitteye.herokuapp.com/