btoews / OctoGAS

GitHub Email Notifications Google Apps Script for Gmail
100 stars 22 forks source link

Let people install via a website #12

Closed btoews closed 9 years ago

btoews commented 9 years ago

Not sure how recent this is, but Google added an API for installing script triggers. This means we can make it easier for people to install the labler and muter functions. This PR starts building a website, hosted by Google, to register triggers for these functions.

So far, I've got a really basic site for installing a trigger for the muter function. The labler function will be harder because people will need to be able to manage their GitHub teams. I've got my current code pushed up to Google Docs here. You can see the page in action here.

I'm hoping I can convince @muan to help me make this this look less terrible.

With muter uninstalled

screen shot 2015-03-02 at 9 59 45 pm

With muter installed

screen shot 2015-03-02 at 9 59 54 pm

btoews commented 9 years ago

Reading some more docs, maybe we can do an OAuth dance with GitHub to fetch the user's teams: https://developers.google.com/apps-script/guides/services/external#making_requests_to_services_with_oauth

muan commented 9 years ago

:100:%!

Is there a way to build this locally or would I have to guess? :grimacing:

btoews commented 9 years ago

@muan Awesome! I can add you as an editor on the Google Docs script. If you go to the script, and then to Publish > Deploy as web app... you will see a link to Test web app for your latest code. That's been the best way I've found to test changes as I make them.

screen shot 2015-03-03 at 10 48 16 am

muan commented 9 years ago

FIRSTPASS! Thoughts?

image

btoews commented 9 years ago

/me squeals with delight

muan commented 9 years ago

Just saw your updates. Let me know when labelers are done and I'll make more changes to the site accordingly! :grimacing:

btoews commented 9 years ago

Just saw your updates. Let me know when labelers are done and I'll make more changes to the site accordingly! :grimacing:

:+1: I was hoping to finish the labler part over the weekend, but didn't have time. I'll try to get it done this week.

btoews commented 9 years ago

@muan I didn't end up finishing the backend code for installing the labler function. I still need to figure out where to persist the list of teams that is loaded from the GitHub API. To keep from blocking the UI work, I added fake installLablerTrigger and uninstallLablerTrigger functions that just sleep for 1/2 second and update lablerBox.className. I wont be making any more changes to the front-end code except for filling those functions in with actual code.

btoews commented 9 years ago

Ok. All the backend parts of this are done and working. I updated this PR with things as they are now on Google Apps Scripts. @muan I think the site looks great. Was there more that you wanted to update before we call this done?

muan commented 9 years ago

Yes there are more. I'll update and let you know. :grimacing:

btoews commented 9 years ago

Thanks!

On Tuesday, March 17, 2015, Mu-An notifications@github.com wrote:

Yes there are more. I'll update and let you know. [image: :grimacing:]

— Reply to this email directly or view it on GitHub https://github.com/mastahyeti/OctoGAS/pull/12#issuecomment-82645683.

-Ben Toews

muan commented 9 years ago

Sorry for the delays, have been putting it off because.. ugh Google App Script development :/

Here's what it looks like now:

image

I'm also considering putting them side by side, do you have a preference?

image

btoews commented 9 years ago

Yay. That background texture looks great. I kind if prefer the vertical layout, just in case more things get added.

muan commented 9 years ago

Sounds good then. :+1:

btoews commented 9 years ago

:boom: thanks @muan!