diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index a4b057b..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: release - -on: - pull_request: - types: - - closed - branches: - - main -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: '0' - - name: Bump version and push tag - uses: anothrNick/github-tag-action@master - env: - GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} - WITH_V: true - RELEASE_BRANCHES: main - DEFAULT_BUMP: minor diff --git a/README.md b/README.md index b814aa7..b216e19 100755 --- a/README.md +++ b/README.md @@ -213,6 +213,7 @@ $fileData = [ $response = $connector->send(new CreateAPostInAGivenStream( streamId: '6002', text: 'Please indicate your preferred dates for next team event in the poll below. Thanks!', + html: '
Please indicate your preferred dates below.
Thanks!
', title: 'Hello guys!', labels: ['food', 'poll', 'events'], sticky: true, @@ -318,7 +319,8 @@ CodebarAg\LaravelBeekeeper\Data\Files\FileVersion { ```php CodebarAg\LaravelBeekeeper\Data\Streams\Post { +id: 2234 // int - +text: "Please indicate your preferred dates for next team event in the poll below. Thanks!" // string + +text: "Please indicate your preferred dates for next team event in the poll below. Thanks!" // string|null + +html: "Please indicate your preferred dates below.
Thanks!
" // string|null +title: "Hello guys!" // string|null +labels: Illuminate\Support\Collection // Collection +sticky: true // bool diff --git a/src/Requests/CreateAChildToAnArtifact.php b/src/Requests/CreateAChildToAnArtifact.php index 7c8911b..066c958 100644 --- a/src/Requests/CreateAChildToAnArtifact.php +++ b/src/Requests/CreateAChildToAnArtifact.php @@ -51,6 +51,7 @@ protected function defaultQuery(): array public function defaultBody(): array { + $body = [ 'name' => $this->name, 'type' => $this->type, diff --git a/src/Requests/CreateAPostInAGivenStream.php b/src/Requests/CreateAPostInAGivenStream.php index badb2b4..784f788 100644 --- a/src/Requests/CreateAPostInAGivenStream.php +++ b/src/Requests/CreateAPostInAGivenStream.php @@ -20,7 +20,8 @@ class CreateAPostInAGivenStream extends Request implements HasBody public function __construct( protected readonly string $streamId, - protected readonly string $text, + protected readonly ?string $text = null, + protected readonly ?string $html = null, protected readonly ?string $title = null, protected null|array|Collection $labels = null, protected readonly bool $sticky = false, @@ -55,14 +56,18 @@ public function defaultBody(): array { $body = []; - if (filled($this->title)) { - $body = Arr::add(array: $body, key: 'title', value: $this->title); - } - if (filled($this->text)) { $body = Arr::add(array: $body, key: 'text', value: $this->text); } + if (filled($this->html)) { + $body = Arr::add(array: $body, key: 'html', value: $this->html); + } + + if (filled($this->title)) { + $body = Arr::add(array: $body, key: 'title', value: $this->title); + } + $labels = $this->labels; if ($labels instanceof Collection) {