Skip to content

feat: mattermost:demo-post artisan command#31

Merged
jordanpartridge merged 1 commit into
mainfrom
feat/25-demo-post-command
Apr 26, 2026
Merged

feat: mattermost:demo-post artisan command#31
jordanpartridge merged 1 commit into
mainfrom
feat/25-demo-post-command

Conversation

@jordanpartridge
Copy link
Copy Markdown
Contributor

Summary

  • Add mattermost:demo-post {channel} {text} artisan command that resolves a channel by team + name via the Saloon client, then posts a message using posts()->createPost()
  • Add team config key to the default connection for team name resolution
  • Register the command in MattermostServiceProvider alongside existing console setup
  • Add Pest feature tests using Mattermost::fake() with mock responses for team lookup, channel lookup, and post creation assertions
  • Update README with a "Try it" section showing demo command usage

Test plan

  • vendor/bin/pest --compact — 226 passed, 0 failures
  • vendor/bin/pint --test — passed
  • vendor/bin/phpstan analyse — no errors at level 8
  • vendor/bin/rector process --dry-run — clean

Closes #25

Add a demo CLI command that posts a message to a Mattermost channel
via the Saloon API client. Resolves team and channel by name from
config or --team option, then calls posts()->createPost().

Includes Pest feature test using Mattermost::fake() with mock
responses for team/channel lookup and post creation assertions.
Copy link
Copy Markdown

@lexi-chief-of-staff lexi-chief-of-staff Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it.

  • Clean artisan command for demo posts, resolves team/channel correctly via config or flag.
  • Comprehensive Pest tests fake API calls and assert requests/body.
  • README & config updates slot in naturally.

Demo utility looks production-ready.

@jordanpartridge jordanpartridge merged commit d4525d1 into main Apr 26, 2026
4 checks passed
@jordanpartridge jordanpartridge deleted the feat/25-demo-post-command branch April 26, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Demo PR: Basic bot implementation posting to town-square channel

1 participant