argoproj / notifications-engine

Affordable notifications for Kubernetes
Apache License 2.0
264 stars 134 forks source link

feat(github) add support for GitHub deployment reference #225

Closed carloscastrojumo closed 4 months ago

carloscastrojumo commented 9 months ago

As it is, the revision that triggered the deployment is used as the ref, however it is useful to override so we can pass a tag, a branch or a different SHA.

Example:

Screenshot 2023-10-02 at 20 32 00

codecov[bot] commented 9 months ago

Codecov Report

Attention: Patch coverage is 26.66667% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 55.35%. Comparing base (ec7fcb4) to head (69e2e96).

Files Patch % Lines
pkg/services/github.go 26.66% 9 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #225 +/- ## ========================================== - Coverage 55.47% 55.35% -0.13% ========================================== Files 35 35 Lines 3425 3438 +13 ========================================== + Hits 1900 1903 +3 - Misses 1248 1256 +8 - Partials 277 279 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pasha-codefresh commented 8 months ago

Thank you, could you please update documentation about this option? Also could you please add test for this parameter ?

@carloscastrojumo

carloscastrojumo commented 8 months ago

Hi @pasha-codefresh . I have updated the documentation about this option. Regarding the test for this parameter, I have included in the TestGetTemplater_GitHub_Deployment test.

To actually test the send message, it requires some mock setup that is currently not defined yet and Im afraid Im not enough go test knowledge to implement the skeleton.

carloscastrojumo commented 7 months ago

@pasha-codefresh any news on this please?

pasha-codefresh commented 4 months ago

Sorry @carloscastrojumo , could you please fix conflicts and i will merge it

carloscastrojumo commented 4 months ago

Done @pasha-codefresh :)

pasha-codefresh commented 4 months ago

Thank you!