-
Notifications
You must be signed in to change notification settings - Fork 0
init #1
Changes from 18 commits
6615cfd
a1935c9
65bb770
e31e550
0148559
adea0f7
f765255
0966f69
51bd94c
4beaf02
cc8c886
9977dfe
718fd71
a610006
3bffd1a
509cdb3
746a4b9
e8ab1fd
40a0ba4
cdbf537
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/vendor | ||
/.idea | ||
/data | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,63 @@ | ||
# my-component | ||
# Slack Writer | ||
|
||
[![Build Status](https://travis-ci.org/keboola/my-component.svg?branch=master)](https://travis-ci.org/keboola/my-component) | ||
[![Build Status](https://travis-ci.com/keboola/wr-slack.svg?branch=master)](https://travis-ci.com/keboola/wr-slack) | ||
|
||
> Fill in description | ||
Keboola Connection Writer for [Slack](https://slack.com/) | ||
|
||
# Usage | ||
|
||
> fill in usage instructions | ||
The following parameters are required: | ||
|
||
- `#token` - Workspace token obtained when the application is installed | ||
- `channel` - Channel to send the messages to, e.g. `#my-channel` or `@some-person` | ||
|
||
At least one table has to be provided on input mapping and it must have one or two columns. If present, the second | ||
column is assumed to be JSON string with message attachments. | ||
|
||
Sample configuration: | ||
|
||
```json | ||
{ | ||
"storage": { | ||
"input": { | ||
"tables": [ | ||
{ | ||
"source": "in.c-main.messages", | ||
"destination": "messages.csv" | ||
} | ||
] | ||
} | ||
}, | ||
"parameters": { | ||
"#token": "xoxa-00000000", | ||
"channel": "@some-person" | ||
} | ||
} | ||
``` | ||
|
||
Sample table: | ||
|
||
``` | ||
"message" | ||
"A message with a <http://connection.keboola.com/|link>" | ||
"A Multiline | ||
message with *bold text*" | ||
``` | ||
|
||
Sample table with attachments: | ||
|
||
``` | ||
"first_col" | ||
"some message","[{""text"":""some text"",""actions"":[{""type"":""button"",""name"":""response"",""value"":""yes"",""text"":""yes"",""style"":""primary""}]}]" | ||
``` | ||
|
||
|
||
## Development | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ještě bych poprosil doplnit, kam se v testech posílají ty zprávy. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO nikam. Musis si nastavit env variables, v travisu nevidim, ze by neco meli zadane. Ja to testuju tak, ze jsem si zalozil svuj slack a kdyz to spoustim, tak tomu ty 2 promenne nastavim. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Datadir testy to někam sypou, ale bylo by fajn, abysme věděli kam - přesně proto, abysme nemuseli zakládat pokaždé vlastní slack :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
||
Clone this repository and init the workspace with following command: | ||
|
||
``` | ||
git clone https://github.com/keboola/my-component | ||
git clone https://github.com/keboola/wr-slack | ||
cd my-component | ||
docker-compose build | ||
docker-compose run --rm dev composer install --no-scripts | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
{ | ||
"require": { | ||
"PHP": "^7.1", | ||
"guzzlehttp/guzzle": "^6.3", | ||
"keboola/csv": "^2.0", | ||
"keboola/php-component": "^4.1" | ||
}, | ||
"require-dev": { | ||
"jakub-onderka/php-parallel-lint": "^1.0", | ||
"keboola/coding-standard": "^4.0", | ||
"keboola/php-temp": "^1.0", | ||
"phpstan/phpstan-shim": "^0.9.2", | ||
"phpstan/phpstan-shim": "^0.10.3", | ||
"phpunit/phpunit": "^7.0", | ||
"symfony/process": "^4.0", | ||
"keboola/datadir-tests": "^1.0" | ||
"keboola/datadir-tests": "^2.1", | ||
"mockery/mockery": "^1.1", | ||
"phpstan/phpstan-mockery": "^0.10" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"MyComponent\\": "src/" | ||
"Keboola\\SlackWriter\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"MyComponent\\Tests\\": "tests/phpunit/" | ||
"Keboola\\SlackWriter\\Tests\\": "tests/phpunit/", | ||
"Keboola\\SlackWriter\\Tests\\Functional\\": "tests/functional/" | ||
} | ||
}, | ||
"scripts": { | ||
"tests-phpunit": "phpunit", | ||
"tests-datadir": "datadir-tests", | ||
"tests-datadir": "phpunit tests/functional", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. spoustet i phpstan There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ten se pouští na ř. 4 v rámci build scriptu There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mas pravdu! |
||
"tests": [ | ||
"@tests-phpunit", | ||
"@tests-datadir" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dává smysl to rovnou dát do generátoru? Najloš říkal že to skoro nikdy není a mívá ten datadir někde vedle a má jich třeba víc, ale jak vidím, tak nejsem jediný, kdo to takhle používá :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taky to tak používám
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/keboola/component-generator/issues/66