Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Body not formatted as markdown

未关闭
#461 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
github-actions, javascript
领域
ci-cd, devops

调研方向

复现提供的由 release 触发的 workflow,并检查 Action 如何处理 Slack payload 中的 release 正文。将渲染结果与预期截图和收到的截图进行比较;当生成的 release notes 以预期的格式出现在通知中时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug duplicate question server-side issue

When creating a release using the auto generated release notes, which is markdown. The body ${{ github.release.event.body }} is not being formatted as expected

Workflow
on:
  release:
    types: 
      - released
      - prereleased
jobs:
  notify:
    runs-on: ubuntu-latest
    steps:
      - run: echo "${{ github.event.release.body || 'No release body provided' }}"
        shell: bash
      - run: |
          echo "Release event detected: ${{ github.event_name }}"
          echo "Release name: ${{ github.event.release.name || github.event.release.tag_name }}"
          echo "Release body: ${{ github.event.release.body }}"
          echo "Release URL: ${{ github.event.release.html_url }}"
          echo "Release is a pre-release: ${{ github.event.release.prerelease }}"
          echo "Workflow run ID: ${{ github.run_id }}"
          echo "Repository: ${{ github.repository }}"
          echo "Server URL: ${{ github.server_url }}"
          

      - name: Send Slack Notification
        uses: slackapi/[email protected]
        with:
          webhook-type: incoming-webhook
          webhook: "${{ secrets.SLACK_WEBHOOK_URL }}"
          payload: |
            text: "🚀 🔖 ✨ Release notice ${{ github.event.release.name || github.event.release.tag_name }} ✨ 🔖 🚀"
            blocks:
              - type: "section"
                text:
                  type: "mrkdwn"
                  text: "*🚀 🔖 ✨ Release notice ${{ github.event.release.name || github.event.release.tag_name }} ✨ 🔖 🚀*"
              - type: "context"
                elements: 
                  - type: "mrkdwn"
                    text: "*Build for*: ${{ github.event.release.prerelease && 'Stage' || 'Production' }}"
                  - type: "mrkdwn"
                    text: "*Version*: ${{ github.event.release.tag_name }}"
              - type: "divider"
              - type: "section"
                text: 
                  type: "mrkdwn"
                  text: "${{ github.event.release.body }}"
              - type: "divider"
              - type: "context"
                elements: 
                  - type: "mrkdwn"
                    text: "<${{ github.event.release.html_url }}|*Full Changelog*>"
                  - type: "mrkdwn"
                    text: "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Workflow Run>"      
Expected:
Image
Recieved:
Image
主要语言
JavaScript
星标
1.4k
派生
200
平均合并
1 分钟
30 天内合并 PR
8

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

slackapi/slack-github-action 的其他 Issue

查看 slackapi/slack-github-action 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。