argoproj / argoproj/notifications-engine

Support Generic Webhook Calls to GitHub with GitHub App Authentication

Open
#37 2 comments 7 reactions 1 assignee Claimed by @ryota-sakamoto View on GitHub
enhancement
Dominant language
Go
Stars
334
Forks
217
PR merge metrics
No merged PRs in 30d

Description

I'm not sure if this issue should be submitted in this repo or in [argocd-notifications](https://github.com/argoproj-labs/argocd-notifications), hopefully here is ok.

Currently the [github service](https://github.com/argoproj/notifications-engine/blob/master/pkg/services/github.go) supports only the [Create Status](https://github.com/argoproj/notifications-engine/blob/1a5452c599569487c6422b3a3427a34ab16e4116/pkg/services/github.go#L190) api.

Notifications to other GitHub API endpoints can be achieved using the generic [webhook service](https://github.com/argoproj/notifications-engine/blob/master/pkg/services/webhook.go), but this method does not support [GitHub App Authentication](https://github.com/argoproj/notifications-engine/blob/1a5452c599569487c6422b3a3427a34ab16e4116/pkg/services/github.go#L132).

GitHub App authentication is preferable to me because at my organization it can be quite difficult to obtain a GitHub machine/service user account, but it is quite easy to receive a new GitHub App instance.

Please provide the ability in the [GitHub service](https://github.com/argoproj/notifications-engine/blob/master/pkg/services/github.go) to build custom notifications to GitHub. I believe the majority, if not all, of the [GitHub REST API](https://docs.github.com/en/rest/reference) could be supported with the current implementation of the [webhook service](https://github.com/argoproj/notifications-engine/blob/master/pkg/services/webhook.go), so a similar (or exact duplicate) implementation but capable of authenticating using a GitHub App would be greatly appreciated.

There are 2 possible implementation options that come to mind:

1. Add a new method in the GitHub service that is capable of doing custom webhook invocations
2. Add a GitHub App authentication method to the generic webhook service

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.