小编Nje*_*igi的帖子

如何使用 slack API 设置 slack 上按钮的颜色

除了默认的 3 之外,我正在尝试为松弛按钮设置其他样式:

- primary (green)
- danger (red)
- default (grey)
Run Code Online (Sandbox Code Playgroud)

例如,我想为按钮设置其他颜色orange

我知道可以通过指定十六进制代码来设置附件的自定义颜色。

有没有办法为松弛按钮指定自定义颜色?

这是我尝试过的:

{
    "text": "Please rate this trip.",
    "attachments": [
        {
            "callback_id": "rate_trip",
            "color": "#3AA3E3",
            "attachment_type": "default",
            "actions": [
                {
                    "name": "yes",
                    "text": "yes :thumbsup:",
                    "type": "button",
                    "value": "yes",
                    "style": "primary"
                },
                {
                    "name": "no",
                    "text": "no :thumbsdown:",
                    "type": "button",
                    "value": "no",
                    "style": "danger"
                },
   // I'd like to make the style for this to be orange but it defaults to grey.
                {
                    "name": …
Run Code Online (Sandbox Code Playgroud)

node.js slack-api

4
推荐指数
1
解决办法
7446
查看次数

Github Actions:有没有办法对从特定分支打开的拉取请求运行操作?

我正在尝试创建一个操作,其工作流程在针对主服务器打开来自特定分支的拉取请求时运行。我目前所拥有的在所有分支针对 master 打开的所有 Pull 请求上运行工作流程。

name: Auto Approve Pull Request
on:
  pull_request:
    branches:
      - 'master'
      - 'skip-*'

jobs:
  build:
    name: Approve PR
    runs-on: ubuntu-latest
    steps:
      - name: Fetch out code
        uses: username/my-github-repo@master
        with:
          token: ******
        env:
          BRANCH_PREFIX: "skip-*"
          PULL_REQUEST_BRANCH: "master"

Run Code Online (Sandbox Code Playgroud)

我想让工作流程仅在名为 的分支上运行skip-*

pull-request github-actions

4
推荐指数
1
解决办法
2080
查看次数

Azure:自动升级失败。'pypi'

当运行任何 azure 命令时,例如az login我遇到此错误消息Auto upgrade failed. 'pypi'

azure

4
推荐指数
1
解决办法
1103
查看次数

标签 统计

azure ×1

github-actions ×1

node.js ×1

pull-request ×1

slack-api ×1