Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Development to Main, Fix CVE #13

Merged
merged 6 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ 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.
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.
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 it's 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 Down Expand Up @@ -43,20 +43,20 @@ Given the following incoming webhook payload to the yaml defined endpoint `http:
"project":{"name":"landing"},
"object_kind":"story",
"object_attributes":{
"title": "Issue with",
"description":"Short description here",
"url": "SITE HERE"
"title": "Issue with",
"description":"Short description here",
"url": "http://site.here"
}
}
```

`wppt` will then send an HTTP post request to the `target_webhook` defined on the yaml with the following payload:
`wppt` will then send a `POST` request to the `target_webhook` defined on the yaml with the following payload:
```json
# Transformed Payload
{
"data": {
"name": "[landing][story] Issue with",
"description": "Description: Short description here\\nURL:SITE HERE"
"name": "[landing][story] Issue with",
"description": "Description: Short description here\\nURL:http://site.here"
}
}
```
Expand All @@ -67,8 +67,10 @@ Given the following incoming webhook payload to the yaml defined endpoint `http:
## Requirements

* Python 3.11+
* Poetry
* Flask
* requests
* PyYAML

## Installation

Expand All @@ -92,7 +94,7 @@ $ make run

#### Building the image
```bash
$ cd docker
$ cd container
$ podman build -t wppt .
```

Expand Down
File renamed without changes.
Loading