GoogleCloudPlatform / cloud-build-notifiers

Notifier images for Cloud Build, complete with build status filtering and Google Secret Manager integration
Apache License 2.0
138 stars 143 forks source link

githubissues notifier - use single notifier for multiple repositories #189

Open LeeU1911 opened 9 months ago

LeeU1911 commented 9 months ago

Current configuration only allows a single repository

      githubRepo: myuser/myrepo

In a larger scale where teams work on multiple repositories, it is undesirable to deploy multiple Cloud Run notifier for each individual repository (from both cost and maintenance perspective)

With a small tweak to use repository full name from Build's default substitutions value of REPO_FULL_NAME, we can deploy the notifier once and use it for multiple repositories.

See default substitutions here: https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values#using_default_substitutions

prabenzom commented 7 months ago

Hi, I just reviewed that PR, hopefully that resolves this issue?

VuKrampHub commented 7 months ago

@prabenzom Yes, indeed. I created this issue to surface the problem in case and used to track the PR in case someone search for the same feature

VuKrampHub commented 7 months ago

@prabenzom I have another commit to automatically set the assignee to the GitHub issue based on commit info. The added complexity is Cloud Build context itself doesn't contain this information and I have to look up via an additional call to GH API.

Is that something you would want to introduce in the upstream version? If yes, I'm more than happy to open another PR for it.

VuKrampHub commented 7 months ago

Also want to ask: I saw someone threw the idea of having community-contributed notifier in the past, is that still on the radar?