Markdown blocks are not sending with incoming webhooks
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
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ả
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:
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
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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của slackapi/slack-github-action
-
docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
slackapi/slack-github-action#667 ·
-
discussion security semver:major
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
slackapi/slack-github-action#621 · 1 bình luận · 1 reaction ·
-
bug: Unexpected token 'o', "ok" is not valid JSONCó thể làm lại được @zimeg đã nhận 58 ngày trước và không có pull request nào đang mở. Đang mởdependencies question
slackapi/slack-github-action#671 · 2 bình luận · 1 người được giao ·
-
needs info question
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
slackapi/slack-github-action#654 · 7 bình luận · 5 reaction ·
-
question
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
slackapi/slack-github-action#520 · 1 bình luận ·
Tất cả issue của slackapi/slack-github-action
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/rocketmq-dashboard#6067 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
luainkernel/lunatik#1853 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
factory-active factory-automatic harness/claude-code task-identify-harness-labels-done task-identify-issue-type-done
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
vercel/ai#22549 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày