Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Markdown blocks are not sending with incoming webhooks

Đang mở
#440 6 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
github-actions
Lĩnh vực
api, ci-cd

Hướng nghiên cứu

Bắt đầu với ví dụ YAML inline và .github/workflows/payload.json, sau đó đọc tài liệu tham chiếu mrkdwn của Slack Block Kit được liên kết. Tái hiện yêu cầu incoming-webhook với cả hai dạng payload và theo dõi cách action xử lý các block; hoàn tất khi hành vi định dạng mong đợi được xác nhận và được bao phủ bởi một test phù hợp hoặc một giới hạn được ghi chép.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

auto-triage-skip bug question server-side issue

Hey folks, I'm trying to send a message with some markdown in it, but its not being honored.

According to the reference these should work?
https://api.slack.com/reference/block-kit/blocks#markdown

Here's my example with inline blocks

- name: Announce Release
    uses: slackapi/[email protected]
    with:
      webhook: ${{ secrets.MY_SECRET }}
      webhook-type: incoming-webhook
      errors: true
      payload: |
        text: "New Release: Shared Helm Chart: 1.2.3"
        blocks:
          - type: header
            text:
              type: plain_text
              text: ":tada: New Release: Shared Helm Chart: 1.2.3"
          - type: divider
          - type: section
            text:
              type: mrkdwn
              text: "## :notebook: Release notes"
          - type: section
            text:
              type: mrkdwn
              text: Blah
          - type: divider
          - type: section
            text:
              type: mrkdwn
              text: "** :computer: Release URL**"
          - type: section
            text:
              type: mrkdwn
              text: http://my_url.com

And this is what it ends up looking like:
Image

I have also tried with a payload file:
GHA

- name: Announce Release
      if: github.event_name == 'push' && github.ref == 'refs/heads/slack-releases3'
      uses: slackapi/[email protected]
      with:
        payload-file-path: .github/workflows/payload.json
        webhook: ${{ secrets.MY_SECRET }}
        webhook-type: incoming-webhook
        errors: true

JSON

{
  "channel": "${{ env.SLACK_CHANNEL_ID }}",
  "text": "Messages met made meetings meet",
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "# Slack notifications sound following the most recent commit pushed"
      }
    }
  ]
}

Result
Image

I would expect to be able to use bold and

HEADER

and other markdown fun in a block called mrkdwn.

Am I doing something wrong?

Ngôn ngữ chính
JavaScript
Star
1.4k
Fork
200
Merge trung bình
1 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của slackapi/slack-github-action

Tất cả issue của slackapi/slack-github-action

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.