Skip to content

Commit

Permalink
Merge pull request #11 from redhat-performance/development
Browse files Browse the repository at this point in the history
Development -> Main
  • Loading branch information
grafuls authored Feb 23, 2024
2 parents e9d4b2b + cbad882 commit 8240205
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
17 changes: 17 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
wppt Project Code of Conduct
===============================

## Overview
We have a simple code of conduct derived from [George Carlin's](https://en.wikipedia.org/wiki/George_Carlin) character Rufus from [Bill and Ted's Excellent Adventure](https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure).

### Guidelines

#### Be Excellent to Each Other, and Party On.
* Always assume good intent in others.
* Focus on positivity and improvement.
* Don't forget to have fun.

#### Don't be Bogus.
* Act in a courteous manner towards everyone.
* Don't totally ravage Oshman’s Sporting Goods.

18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="assets/logo.png" width=100px height=100px>
<img src="assets/logo.png" width=100px height=100px>

# Wppt
#### Webhook Payload Proxy Transformer
Expand All @@ -13,7 +13,7 @@ Some services/platforms don't provide an easy-to-use integration vehicle for tra

## How Does `wppt` Work?

Wppt leverages Flask dynamic routing. The endpoint is variable and defined via one or multiple yaml files.
Wppt leverages Flask dynamic routing. The endpoint is variable and defined via one or multiple yaml files.
Based on the endpoint url, `wppt` parses all the yaml files stored on the `transformers` directory, and retrieves the outgoing webhook url and the translations. It then parses all the translations and converts the existing data from the incoming webhook into a new payload structure as defined on the yaml.

### Example:
Expand All @@ -40,11 +40,11 @@ Given the following incoming webhook payload to the yaml defined endpoint `http:
```json
# Incoming Payload
{
"project":{"name":"landing"},
"object_kind":"story",
"project":{"name":"landing"},
"object_kind":"story",
"object_attributes":{
"title": "Issue with",
"description":"Short description here",
"title": "Issue with",
"description":"Short description here",
"url": "SITE HERE"
}
}
Expand All @@ -55,13 +55,13 @@ Given the following incoming webhook payload to the yaml defined endpoint `http:
# Transformed Payload
{
"data": {
"name": "[landing][story] Issue with",
"name": "[landing][story] Issue with",
"description": "Description: Short description here\\nURL:SITE HERE"
}
}
```

> [!NOTE]
> [!NOTE]
> The structure of the transformed payload is based on the structure defined on the childs of the yaml `translations` node

## Requirements
Expand Down Expand Up @@ -98,6 +98,6 @@ $ podman build -t wppt .

#### Running
```bash
$ podman run -it --rm -v /path/to/local/transformers/:/opt/wppt/transformers -p 5005:5005 wppt
$ podman run -it --rm -v ../wppt/transformers:/opt/wppt/transformers -p 5005:5005 wppt
```

0 comments on commit 8240205

Please sign in to comment.