It would be awesome to get push notifications for my watched repos. This is something that all other GitHub apps either don't have or are a paid feature.
I could definitely work on at least the iOS push notifications, though Android doesn't seem to be much different.
This might help: https://medium.com/differential/how-to-setup-push-notifications-in-react-native-ios-android-30ea0131355e
I think this is an outstanding idea, please feel free to go ahead trying it with iOS. I can (or anybody else with Android) will be happy to help with Android if they happen to be different.
So push notifications for watched repos is a great start. Definitely worth exploring push notifications for other things (such as a user has followed you for example) and then eventually allowing the user to change which notifications they get. Of course this is just cherries on top, definitely worth getting watched repo notifications up and running first.
Best way to go about this IMO is to poll each user's notifications feed every ~2 minutes and send any new notifications to OneSignal. Tell me if anyone has any better ideas tho!
Just contacted GitHub about the possibility of adding webhooks for users as that would make this all _a lot_ easier.
Edit: wow they got back to me quickly, here's their reply:
Hi Andrew,
Thanks for getting in touch! We've passed your request to the team working on webhooks internally for consideration, though we can't make any promises. Let us know if you have any other ideas!
They also pointed me towards using Conditional Requests if we do go down the polling avenue: https://developer.github.com/v3/#conditional-requests
Something else I'm looking into is setting up Firebase Cloud Function on a 2-5 minute cron job. We get 125,000 calls/month for free, which would be 2.89 calls/minute. We also have only 540 seconds to complete the call before it gets forcefully terminated.
Here's my thinking for the flow of how this would work:
I think this is the best we can do until GitHub adds user event webhooks.
That sounds amazing @andrewda 馃檶 I'm always impressed with how much Firebase provides for free. Even though costs can get steep with priced plans, they always have awesome free starting points. Appreciate you looking into this.
Couple of things I'm curious about:
Hmm you're right it very well might be easier to leverage the user's access token in that case - let's decide at that point if storing the user token in a secure server is a viable option
It's also completely up to the user whether their token would be stored, and we would make it clear that the token would be immediately when the user disables push notifications.
Is there a way that we can get a separate token with only the notification reading scope? I think it would be fine if that only required another sign in from the user.
I think that's a great idea. We may be able to leverage Basic Auth specifically creating a scope for notification and then clearing it when they disable again. If this happens to require an additional sign in, I'm okay with that as long as we briefly explain to the user why it's necessary (for improved security and so forth)
This feature would be golden! 馃
Any update on this feature? Would love it implemented within the app
Hallo @housseindjirdeh and @andrewda , I am using GitPoint for a few weeks now and it's a pleasure to work with this app! Is there any update on this push notification feature? Have to agree with @henrikra: it would be golden! =:-)
Me too! Initially, I thought I had missed out on some setting but only later realized that push notifications are not a feature of the app yet. Any updates? It would be awesome!
Unfortunately I've been busy lately and have been away from the project for a while, but I'm looking to get back into GitPoint soon and will continue looking into a way to make notifications work!
Same here, I've been a bit occupied this past while unfortunately and most of the maintainers have :(
But I'm also looking to get back into the swing of things in the coming weeks. If this is a priority, I can work on this first as well :)
I just read this article, and I wonder if we could do something similar to send push notifications?
https://towardsdatascience.com/using-gitlabs-ci-for-periodic-data-mining-b3cc314ecd85
Most helpful comment
This feature would be golden! 馃