galonge / GCB-Slack-Notifier

Google Cloud Build Slack Integration using Google Cloud Function
6 stars 10 forks source link

2 errors when tried in gcp #1

Open milentzvetkov opened 3 years ago

milentzvetkov commented 3 years ago

Hi,

I gave it a try Here is some feedback:

  1. When you try to use - gcloud functions deploy subscribe --stage-bucket [BUCKET_NAME] \ --trigger-topic cloud-builds

It gives you an error because you must specify --runtime. I've tried with nodejs10 and 12 and the function is deploying. But when I start a build TypeError: callback is not a function at module.exports.subscribe (index.js:25) So i tried to remove the IF and continue Then TypeError: Cannot read property 'repoName' of undefined at createSlackMessage (/workspace/index.js:42) at module.exports.subscribe (index.js:25) at Promise.resolve.then (invoker.js:199) at process._tickCallback (next_tick.js:68)

I've followed the https://georgealonge.medium.com/how-to-setup-slack-integration-for-google-cloud-build-using-cloud-functions-e357b580c7a1 article.

AliRezaBeitari commented 2 years ago

Fixed the issue in https://github.com/galonge/GCB-Slack-Notifier/pull/2