question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Instructions for running on Cloud Functions for Firebase

See original GitHub issue

Similar to https://github.com/probot/probot/issues/149 this framework seems like a great fit for a serverless workload. In fact the code block in the main README looks very similar to the hello world example for Cloud Functions:

Probot:

module.exports = robot => {
  robot.on('issues.opened', async context => {
    const issueComment = context.issue({ body: 'Thanks for opening this issue!' })
    return context.github.issues.createComment(issueComment)
  })
}

Cloud Functions HTTP Example:

exports.myRobotFunction = functions.https.onRequest((req, res) => {
  // ...
});

Would you be open to my adding documentation on how to deploy a Probot on Cloud Functions for Firebase in this repository? I assume I’ll have to get around the async/await issues mentioned in #149 but that’s likely not an impossible hurdle.

cc @abehaskins @codingdoug

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:21 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
samtsterncommented, Mar 19, 2018

@JasonEtco thanks for the update, that proposed integration looks perfect! I’ll comment if I see anything/

1reaction
tcbyrdcommented, Feb 20, 2018

@JasonEtco What I’m hoping we can accomplish with any cloud SDKs is to use inherent knowledge of what’s available in the execution environment to avoid bringing in any dependencies that are already available.

A few examples:

  • A Firebase developer will deploy functions from a Firebase project, which means they probably already have the firebase package as a dependency.
  • A Lambda function’s execution environment includes the necessary libraries for connecting to other AWS services.
  • Azure functions have bindings available to various other Azure services.

The way I see it working, deploying a Probot serverless function is basically a way to add the GitHub APIs to those platforms, so any Probot function you deploy would be able to talk to GitHub as easily as it talks to other native platform services.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get started: write, test, and deploy your first functions - Firebase
Run firebase login to log in via the browser and authenticate the Firebase CLI. Go to your Firebase project directory. Run firebase init...
Read more >
A Practical Approach to Cloud Functions for Firebase: Setup
Cloud Functions for Firebase is a lightweight tool that allows you to run code snippets written in JavaScript or TypeScript for the Node ......
Read more >
How-to Guides | Cloud Functions Documentation
Invoke a Cloud Function on a time-based schedule using Cloud Scheduler and a Cloud Pub/Sub trigger. This enables you to set up cron...
Read more >
Firebase Cloud Functions: Introduction and Project Setup
Cloud Functions run in response to events inside Google Cloud services, including any Firebase products that you may be using. In other words:....
Read more >
Secure Firebase Cloud Functions for Authenticated Users
Next, we run a cloud function that is triggered on the secured node. Firebase will block any updates to a node that is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found