Hacker News new | past | comments | ask | show | jobs | submit login
Get notified when a file on GitHub has changed (mastykarz.nl)
73 points by waldekm on Jan 25, 2021 | hide | past | favorite | 29 comments



If 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/maste... becomes 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.


Yep, this is the simplest solution.


Yeah, it is super handy. I routinely do this for Changelog files from the libraries I use.


thank you! I really like this approach and didn't knew it was working well.


Nice! Thanks for sharing!


My 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/startin...

2. Create a new code monitor at https://sourcegraph.com/code-monitoring

Whenever the file changes, you’ll get an email notification.


It’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


You 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


I like, nay, love, the fact the word "just" is so prominent in the description of your solution.


...considering building a "just" expander that shows all the steps required to "just" do anything.


I mean...it is just three steps involving some clicks and no code. I think that fits the bar for "just"


with 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"


I think this only works if you have admin on the repo.


Well, the solution includes filtering down to specific files. "any change" might just be noise.


Shameless 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/


If you use 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.


You 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.... 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.


Would 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/ but it stopped its service.


Does this use polling? And won't this cause problems?


Yes, 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/gi...


You 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


Fair 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...


> 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?


Good call out, though I'd put it under the umbrella of expensive, since someone banning or throttling you is a symptom of it.


The 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.


How 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?


The 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.


GitHub is owned by Microsoft.


I always forget that fact...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: