|
| 1 | +name: Lark notification |
| 2 | +on: |
| 3 | + push: |
| 4 | + issues: |
| 5 | + issue_comment: |
| 6 | + pull_request: |
| 7 | + |
| 8 | +jobs: |
| 9 | + send-Lark-message: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - name: Issue/PR opened |
| 13 | + uses: foxundermoon/feishu-action@v2 |
| 14 | + if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'reopened') |
| 15 | + with: |
| 16 | + url: ${{ secrets.LARK_CHATBOT_HOOK_URL }} |
| 17 | + msg_type: post |
| 18 | + content: | |
| 19 | + post: |
| 20 | + zh_cn: |
| 21 | + title: GitHub issue 打开:${{ github.event.issue.title }} |
| 22 | + content: |
| 23 | + - - tag: text |
| 24 | + text: 链接: |
| 25 | + - tag: a |
| 26 | + text: ${{ github.event.issue.html_url }} |
| 27 | + href: ${{ github.event.issue.html_url }} |
| 28 | + - - tag: text |
| 29 | + text: 作者: |
| 30 | + - tag: a |
| 31 | + text: ${{ github.event.issue.user.login }} |
| 32 | + href: ${{ github.event.issue.user.html_url }} |
| 33 | + - - tag: text |
| 34 | + text: 指派: |
| 35 | + - tag: a |
| 36 | + text: ${{ github.event.issue.assignee.login }} |
| 37 | + href: ${{ github.event.issue.assignee.html_url }} |
| 38 | + - - tag: text |
| 39 | + text: "标签:${{ github.event.issue.labels }}" |
| 40 | + - - tag: text |
| 41 | + text: 里程碑:${{ github.event.issue.milestone.title }} |
| 42 | + - - tag: text |
| 43 | + text: 内容: |
| 44 | + - tag: text |
| 45 | + text: | |
| 46 | + ${{ github.event.issue.body }} |
| 47 | + - name: Issue edited |
| 48 | + uses: foxundermoon/feishu-action@v2 |
| 49 | + if: github.event_name == 'issues' && (github.event.action == 'edited' || github.event.action == 'transferred' || github.event.action == 'labeled' || github.event.action == 'unlabeled' || github.event.action == 'assigned' || github.event.action == 'unassigned') |
| 50 | + with: |
| 51 | + url: ${{ secrets.LARK_CHATBOT_HOOK_URL }} |
| 52 | + msg_type: post |
| 53 | + content: | |
| 54 | + post: |
| 55 | + zh_cn: |
| 56 | + title: GitHub issue 编辑:${{ github.event.issue.title }} |
| 57 | + content: |
| 58 | + - - tag: text |
| 59 | + text: 链接: |
| 60 | + - tag: a |
| 61 | + text: ${{ github.event.issue.html_url }} |
| 62 | + href: ${{ github.event.issue.html_url }} |
| 63 | + - - tag: text |
| 64 | + text: 作者: |
| 65 | + - tag: a |
| 66 | + text: ${{ github.event.issue.user.login }} |
| 67 | + href: ${{ github.event.issue.user.html_url }} |
| 68 | + - - tag: text |
| 69 | + text: 指派: |
| 70 | + - tag: a |
| 71 | + text: ${{ github.event.issue.assignee.login }} |
| 72 | + href: ${{ github.event.issue.assignee.html_url }} |
| 73 | + - - tag: text |
| 74 | + text: "标签:${{ github.event.issue.labels }}" |
| 75 | + - - tag: text |
| 76 | + text: 里程碑:${{ github.event.issue.milestone.title }} |
| 77 | + - - tag: text |
| 78 | + text: 内容: |
| 79 | + - tag: text |
| 80 | + text: | |
| 81 | + ${{ github.event.issue.body }} |
| 82 | + - name: Issue closed |
| 83 | + uses: foxundermoon/feishu-action@v2 |
| 84 | + if: github.event_name == 'issues' && github.event.action == 'closed' |
| 85 | + with: |
| 86 | + url: ${{ secrets.LARK_CHATBOT_HOOK_URL }} |
| 87 | + msg_type: post |
| 88 | + content: | |
| 89 | + post: |
| 90 | + zh_cn: |
| 91 | + title: GitHub issue 关闭:${{ github.event.issue.title }} |
| 92 | + content: |
| 93 | + - - tag: text |
| 94 | + text: 链接: |
| 95 | + - tag: a |
| 96 | + text: ${{ github.event.issue.html_url }} |
| 97 | + href: ${{ github.event.issue.html_url }} |
| 98 | + - - tag: text |
| 99 | + text: 作者: |
| 100 | + - tag: a |
| 101 | + text: ${{ github.event.issue.user.login }} |
| 102 | + href: ${{ github.event.issue.user.html_url }} |
| 103 | + - - tag: text |
| 104 | + text: 指派: |
| 105 | + - tag: a |
| 106 | + text: ${{ github.event.issue.assignee.login }} |
| 107 | + href: ${{ github.event.issue.assignee.html_url }} |
| 108 | + - - tag: text |
| 109 | + text: "标签:${{ github.event.issue.labels }}" |
| 110 | + - - tag: text |
| 111 | + text: 里程碑:${{ github.event.issue.milestone.title }} |
| 112 | + - - tag: text |
| 113 | + text: 内容: |
| 114 | + - tag: text |
| 115 | + text: | |
| 116 | + ${{ github.event.issue.body }} |
| 117 | + - name: PR opened |
| 118 | + uses: foxundermoon/feishu-action@v2 |
| 119 | + if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened') |
| 120 | + with: |
| 121 | + url: ${{ secrets.LARK_CHATBOT_HOOK_URL }} |
| 122 | + msg_type: post |
| 123 | + content: | |
| 124 | + post: |
| 125 | + zh_cn: |
| 126 | + title: GitHub PR 打开:${{ github.event.pull_request.title }} |
| 127 | + content: |
| 128 | + - - tag: text |
| 129 | + text: 链接: |
| 130 | + - tag: a |
| 131 | + text: ${{ github.event.pull_request.html_url }} |
| 132 | + href: ${{ github.event.pull_request.html_url }} |
| 133 | + - - tag: text |
| 134 | + text: 作者: |
| 135 | + - tag: a |
| 136 | + text: ${{ github.event.pull_request.user.login }} |
| 137 | + href: ${{ github.event.pull_request.user.html_url }} |
| 138 | + - - tag: text |
| 139 | + text: 指派: |
| 140 | + - tag: a |
| 141 | + text: ${{ github.event.pull_request.assignee.login }} |
| 142 | + href: ${{ github.event.pull_request.assignee.html_url }} |
| 143 | + - - tag: text |
| 144 | + text: "标签:${{ github.event.pull_request.labels }}" |
| 145 | + - - tag: text |
| 146 | + text: 里程碑:${{ github.event.pull_request.milestone.title }} |
| 147 | + - - tag: text |
| 148 | + text: 内容: |
| 149 | + - tag: text |
| 150 | + text: | |
| 151 | + ${{ github.event.pull_request.body }} |
| 152 | + - name: PR edited |
| 153 | + uses: foxundermoon/feishu-action@v2 |
| 154 | + if: github.event_name == 'pull_request' && (github.event.action == 'edited' || github.event.action == 'labeled' || github.event.action == 'unlabeled' || github.event.action == 'assigned' || github.event.action == 'unassigned') |
| 155 | + with: |
| 156 | + url: ${{ secrets.LARK_CHATBOT_HOOK_URL }} |
| 157 | + msg_type: post |
| 158 | + content: | |
| 159 | + post: |
| 160 | + zh_cn: |
| 161 | + title: GitHub PR 编辑:${{ github.event.pull_request.title }} |
| 162 | + content: |
| 163 | + - - tag: text |
| 164 | + text: 链接: |
| 165 | + - tag: a |
| 166 | + text: ${{ github.event.pull_request.html_url }} |
| 167 | + href: ${{ github.event.pull_request.html_url }} |
| 168 | + - - tag: text |
| 169 | + text: 作者: |
| 170 | + - tag: a |
| 171 | + text: ${{ github.event.pull_request.user.login }} |
| 172 | + href: ${{ github.event.pull_request.user.html_url }} |
| 173 | + - - tag: text |
| 174 | + text: 指派: |
| 175 | + - tag: a |
| 176 | + text: ${{ github.event.pull_request.assignee.login }} |
| 177 | + href: ${{ github.event.pull_request.assignee.html_url }} |
| 178 | + - - tag: text |
| 179 | + text: "标签:${{ github.event.pull_request.labels }}" |
| 180 | + - - tag: text |
| 181 | + text: 里程碑:${{ github.event.pull_request.milestone.title }} |
| 182 | + - - tag: text |
| 183 | + text: 内容: |
| 184 | + - tag: text |
| 185 | + text: | |
| 186 | + ${{ github.event.pull_request.body }} |
| 187 | + - name: PR closed |
| 188 | + uses: foxundermoon/feishu-action@v2 |
| 189 | + if: github.event_name == 'pull_request' && github.event.action == 'closed' |
| 190 | + with: |
| 191 | + url: ${{ secrets.LARK_CHATBOT_HOOK_URL }} |
| 192 | + msg_type: post |
| 193 | + content: | |
| 194 | + post: |
| 195 | + zh_cn: |
| 196 | + title: GitHub PR 关闭:${{ github.event.pull_request.title }} |
| 197 | + content: |
| 198 | + - - tag: text |
| 199 | + text: 链接: |
| 200 | + - tag: a |
| 201 | + text: ${{ github.event.pull_request.html_url }} |
| 202 | + href: ${{ github.event.pull_request.html_url }} |
| 203 | + - - tag: text |
| 204 | + text: 作者: |
| 205 | + - tag: a |
| 206 | + text: ${{ github.event.pull_request.user.login }} |
| 207 | + href: ${{ github.event.pull_request.user.html_url }} |
| 208 | + - - tag: text |
| 209 | + text: 指派: |
| 210 | + - tag: a |
| 211 | + text: ${{ github.event.pull_request.assignee.login }} |
| 212 | + href: ${{ github.event.pull_request.assignee.html_url }} |
| 213 | + - - tag: text |
| 214 | + text: "标签:${{ github.event.pull_request.labels }}" |
| 215 | + - - tag: text |
| 216 | + text: 里程碑:${{ github.event.pull_request.milestone.title }} |
| 217 | + - - tag: text |
| 218 | + text: 内容: |
| 219 | + - tag: text |
| 220 | + text: | |
| 221 | + ${{ github.event.pull_request.body }} |
| 222 | + - name: Issue commented |
| 223 | + uses: foxundermoon/feishu-action@v2 |
| 224 | + if: github.event_name == 'issue_comment' && (github.event.action == 'created' || github.event.action == 'edited') |
| 225 | + with: |
| 226 | + url: ${{ secrets.LARK_CHATBOT_HOOK_URL }} |
| 227 | + msg_type: post |
| 228 | + content: | |
| 229 | + post: |
| 230 | + zh_cn: |
| 231 | + title: GitHub issue 评论:${{ github.event.issue.title }} |
| 232 | + content: |
| 233 | + - - tag: text |
| 234 | + text: 链接: |
| 235 | + - tag: a |
| 236 | + text: ${{ github.event.comment.html_url }} |
| 237 | + href: ${{ github.event.comment.html_url }} |
| 238 | + - - tag: text |
| 239 | + text: 作者: |
| 240 | + - tag: a |
| 241 | + text: ${{ github.event.comment.user.login }} |
| 242 | + href: ${{ github.event.comment.user.html_url }} |
| 243 | + - - tag: text |
| 244 | + text: 内容: |
| 245 | + - tag: text |
| 246 | + text: | |
| 247 | + ${{ github.event.comment.body }} |
0 commit comments