github-bridge

command module
v0.0.0-...-e454325 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

README

GitHub Bridge SNS Publisher

This project serves as a bridge between incoming GitHub webhooks and AWS SNS. It listens for incoming requests, validates them based on the HMAC signature, and then publishes the payload to the appropriate SNS topic based on the GitHub event type.

Configuration

Environment Variables

Ensure these environment variables are correctly set up for the application's smooth operation:

Name Description
TOPIC_PREFIX Specifies the prefix for the SNS topics.
HMAC_SECRET The secret key utilized for validating the HMAC signature of incoming GitHub webhooks.
Validation and Error Handling

Always ensure that your configuration is correct. Two primary custom errors will indicate configuration issues:

ErrHmacSecretNotSet: Indicates the HmacSecret field isn't populated.
ErrTopicPrefixNotSet: Signifies that the TopicPrefix field is not populated.

If you encounter these errors, review your environment variables or configuration setup.

Development

Running Tests

To run the tests, run the following command:

go test ./...
Building the Application

To build the application, run the following command:

go build -o github-bridge-sns-publisher

Contributing

Open up a pull request with your changes. Ensure that you've added tests for your changes and that all tests pass. Or open up an issue if you've found a bug or have a feature request.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL