Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github file change notification

Is there a way to notify people on change of some certain files? Specifically, I would like to track change of *.sql files and and notify our developers on a change. How can I configure post commit hooks to notify?

like image 978
Cemo Avatar asked Oct 03 '13 21:10

Cemo


People also ask

How do I get notifications from GitHub?

In the left sidebar, under the list of repositories, use the "Manage notifications" drop-down to click Notification settings. On the notifications settings page, choose how you receive notifications when: There are updates in repositories or team discussions you're watching or in a conversation you're participating in.

How do I send notifications on GitHub?

On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. In the "Integrations" section of the sidebar, click Email notifications. Type up to two email addresses, separated by whitespace, where you'd like notifications to be sent.

Does GitHub notify users?

There are no ways to do it because GitHub delivers only two kinds of notifications: Participating: Someone mentions you or a team you're a member of. You are assigned to an issue or pull request.

How do I get GitHub notifications on my desktop?

### Notifications permission If you want to receive desktop notifications, you can enable them on extension options page. You will then be asked for the notifications permission.


2 Answers

If you want folks to get notified via email, and you want them to manage their own notifications, then https://app.github-file-watcher.com/ should do the trick - it monitors any public repo, and will notify you via email of changes to any file, a specific file, or some files that match your criteria.

like image 136
Cooper Avatar answered Sep 23 '22 11:09

Cooper


Use git diff-tree in your post-receive hook:

 git diff-tree --name-status -rz 

You can grep the result to check if certain files are modified (status 'M'), as described in this answer.
you can find many examples on gist.github.com, with this one using the --name-status option.

like image 41
VonC Avatar answered Sep 23 '22 11:09

VonC