Skip to content
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
42 changes: 3 additions & 39 deletions .github/workflows/docs-preview-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
type: string
required: true
description: "PR number (fork PR to build preview for)"
TRIGGERING_ACTOR:
type: string
required: true
description: "GitHub login of the fork PR author"
COMMIT_SHA:
type: string
required: true
Expand All @@ -31,11 +27,11 @@ jobs:
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ inputs.COMMIT_SHA }}
context: "docs-preview-fork / preview"
context: docs-preview
description: "Docs preview build for ${{ inputs.COMMIT_SHA }} is running"
status: pending

preview:
deploy:
uses: ./.github/workflows/docs-preview-template.yml
secrets:
AWS_DOCS_PR_PREVIEW_KEY_ID: ${{ secrets.AWS_DOCS_PR_PREVIEW_KEY_ID }}
Expand All @@ -45,36 +41,4 @@ jobs:
with:
PR_NUMBER: ${{ inputs.PR_NUMBER }}
COMMIT_SHA: ${{ inputs.COMMIT_SHA }}

update-failure-status:
runs-on: ubuntu-latest
if: failure() || cancelled()
needs:
- preview
steps:
- uses: mattermost/actions/delivery/update-commit-status@fec7b836001c9380d4bfaf28d443945c103a098c
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ inputs.COMMIT_SHA }}
context: "docs-preview-fork / preview"
description: "Docs preview build for ${{ inputs.COMMIT_SHA }} failed"
status: failure

update-success-status:
runs-on: ubuntu-latest
if: success()
needs:
- preview
steps:
- uses: mattermost/actions/delivery/update-commit-status@fec7b836001c9380d4bfaf28d443945c103a098c
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ inputs.COMMIT_SHA }}
context: "docs-preview-fork / preview"
description: "Docs preview build for ${{ inputs.COMMIT_SHA }} succeeded"
status: success
target_url: "http://${{ vars.DOCS_PREVIEW_BUCKET_NAME }}.s3-website-us-east-1.amazonaws.com/mattermost/pr-${{ inputs.PR_NUMBER }}/"
STATUS_CONTEXT: docs-preview
44 changes: 42 additions & 2 deletions .github/workflows/docs-preview-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ on:
COMMIT_SHA:
type: string
required: true
# Commit status context shown on the PR. Details (⋯) links to the preview
# when status is success. Empty skips status updates.
STATUS_CONTEXT:
type: string
required: false
default: docs-preview
secrets:
AWS_DOCS_PR_PREVIEW_KEY_ID:
required: true
Expand All @@ -23,10 +29,10 @@ concurrency:

permissions:
contents: read
statuses: write

jobs:
preview:
name: Build and deploy preview
deploy:
runs-on: ubuntu-24.04
steps:
- name: Checkout
Expand Down Expand Up @@ -89,3 +95,37 @@ jobs:
"s3://${BUCKET_NAME}/mattermost/pr-${PR_NUMBER}/" \
--delete \
--no-progress

- name: Set preview URL
id: preview
env:
BUCKET_NAME: ${{ vars.DOCS_PREVIEW_BUCKET_NAME }}
PR_NUMBER: ${{ inputs.PR_NUMBER }}
run: |
echo "url=http://${BUCKET_NAME}.s3-website-us-east-1.amazonaws.com/mattermost/pr-${PR_NUMBER}/" >> "$GITHUB_OUTPUT"

# Details (⋯) on this check links to the preview URL via target_url.
- name: Set success commit status
if: ${{ inputs.STATUS_CONTEXT != '' }}
uses: mattermost/actions/delivery/update-commit-status@fec7b836001c9380d4bfaf28d443945c103a098c
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ inputs.COMMIT_SHA }}
context: ${{ inputs.STATUS_CONTEXT }}
description: "Docs preview build for ${{ inputs.COMMIT_SHA }} succeeded"
status: success
target_url: ${{ steps.preview.outputs.url }}

- name: Set failure commit status
if: ${{ always() && inputs.STATUS_CONTEXT != '' && (failure() || cancelled()) }}
uses: mattermost/actions/delivery/update-commit-status@fec7b836001c9380d4bfaf28d443945c103a098c
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ inputs.COMMIT_SHA }}
context: ${{ inputs.STATUS_CONTEXT }}
description: "Docs preview build for ${{ inputs.COMMIT_SHA }} failed"
status: failure
51 changes: 1 addition & 50 deletions .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,62 +12,13 @@ permissions:
statuses: write

jobs:
update-initial-status:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Set pending commit status
uses: mattermost/actions/delivery/update-commit-status@fec7b836001c9380d4bfaf28d443945c103a098c
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ github.event.pull_request.head.sha }}
context: "docs-preview / preview"
description: "Docs preview build for ${{ github.event.pull_request.head.sha }} is running"
status: pending

deploy:
uses: ./.github/workflows/docs-preview-template.yml
if: github.event.pull_request.head.repo.full_name == github.repository
needs:
- update-initial-status
secrets:
AWS_DOCS_PR_PREVIEW_KEY_ID: ${{ secrets.AWS_DOCS_PR_PREVIEW_KEY_ID }}
AWS_DOCS_PR_PREVIEW_SECRET_ACCESS_KEY: ${{ secrets.AWS_DOCS_PR_PREVIEW_SECRET_ACCESS_KEY }}
with:
PR_NUMBER: ${{ github.event.number }}
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}

update-failure-status:
runs-on: ubuntu-latest
if: failure() || cancelled()
needs:
- deploy
steps:
- uses: mattermost/actions/delivery/update-commit-status@fec7b836001c9380d4bfaf28d443945c103a098c
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ github.event.pull_request.head.sha }}
context: "docs-preview / preview"
description: "Docs preview build for ${{ github.event.pull_request.head.sha }} failed"
status: failure

update-success-status:
runs-on: ubuntu-latest
if: success()
needs:
- deploy
steps:
- uses: mattermost/actions/delivery/update-commit-status@fec7b836001c9380d4bfaf28d443945c103a098c
env:
GITHUB_TOKEN: ${{ github.token }}
with:
repository_full_name: ${{ github.repository }}
commit_sha: ${{ github.event.pull_request.head.sha }}
context: "docs-preview / preview"
description: "Docs preview build for ${{ github.event.pull_request.head.sha }} succeeded"
status: success
target_url: "http://${{ vars.DOCS_PREVIEW_BUCKET_NAME }}.s3-website-us-east-1.amazonaws.com/mattermost/pr-${{ github.event.number }}/"
STATUS_CONTEXT: docs-preview
6 changes: 6 additions & 0 deletions docs/develop/integrate/plugins/interactive-messages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ To try it out, you can use this [Matterpoll plugin](https://github.com/matterpol

![image](poll.png)

## Markdown action buttons

In addition to message-attachment buttons and menus, you can embed interactive affordances directly in a post's markdown body using `mmaction://` links backed by a `mm_blocks_actions` post prop. This is useful when a short message reads naturally with an inline "Approve" or "Reject" link and a full message attachment isn't warranted.

See [markdown action buttons](/developers/integrate/reference/markdown-actions) for the full schema, limits, and end-to-end flow.

## Message buttons

Add message buttons as `actions` in your integration [message attachments](https://docs.mattermost.com/developer/message-attachments.html).
Expand Down
Loading
Loading