@actionsflow/trigger-trello 中文文档教程
@actionsflow/trigger-trello
这是 Actionsflow 的 trello 触发器。 Trello 中的任何新操作都会触发触发器。
这是一个官方触发器,您不需要手动安装它。
Prerequisites
你应该 使用 API 在 trello 上创建一个 webhook,并设置 https://webhook.actionsflow。 workers.dev/
作为你的端点,一个 CURL 例子:
curl --request POST \
--data-urlencode "callbackURL=https://webhook.actionsflow.workers.dev/<owner>/<repo>/<workflow-file-name>/trello?__token=<your-github-personal-token>" \
--url 'https://api.trello.com/1/webhooks/?key=0471642aefef5fa1fa76530ce1ba4c85&token=9eb76d9a9d02b8dd40c2f3e5df18556c831d4d1fadbe2c45f8310e6c93b5c548&idModel=5abbe4b7ddc1b351ef961414' \
--header 'Accept: application/json'
你可以在此处 获取 trello 密钥,并为您生成一个令牌。
您可以通过
curl https://api.trello.com/1/members/me/boards?key={yourKey}&token={yourToken}
获取idModel
Usage
on:
trello:
Options
没有什么可以指定的。 您可以使用Actionsflow 触发器的常规配置 进行更多自定义。
Outputs
此触发器的输出将是 aws sns 消息正文的正文,您可以看到它 此处
一个输出示例:
{
"model": {
"id": "5f4fbbc5250c34138444068d",
"name": "ideas",
"desc": "",
"descData": null,
"closed": false,
"idOrganization": null,
"idEnterprise": null,
"pinned": false,
"url": "https://trello.com/b/iCZf1Oev/ideas",
"shortUrl": "https://trello.com/b/iCZf1Oev",
"prefs": {
"permissionLevel": "private",
"hideVotes": false,
"voting": "disabled",
"comments": "members",
"invitations": "members",
"selfJoin": true,
"cardCovers": true,
"isTemplate": false,
"cardAging": "regular",
"calendarFeedEnabled": false,
"background": "lime",
"backgroundImage": null,
"backgroundImageScaled": null,
"backgroundTile": false,
"backgroundBrightness": "dark",
"backgroundColor": "#4BBF6B",
"backgroundBottomColor": "#4BBF6B",
"backgroundTopColor": "#4BBF6B",
"canBePublic": true,
"canBeEnterprise": true,
"canBeOrg": true,
"canBePrivate": true,
"canInvite": true
},
"labelNames": {
"green": "",
"yellow": "",
"orange": "",
"red": "",
"purple": "",
"blue": "",
"sky": "",
"lime": "",
"pink": "",
"black": ""
}
},
"action": {
"id": "5f7073311f0aab7e1c3dd44c",
"idMemberCreator": "5f4fbba99b140e21cceebdb1",
"data": {
"card": {
"id": "5f7073311f0aab7e1c3dd44b",
"name": "test item",
"idShort": 2,
"shortLink": "Iy3XGStt"
},
"list": { "id": "5f70732bb7991045f878901e", "name": "todos" },
"board": {
"id": "5f4fbbc5250c34138444068d",
"name": "ideas",
"shortLink": "iCZf1Oev"
}
},
"type": "createCard",
"date": "2020-09-27T11:10:41.983Z",
"limits": {},
"appCreator": null,
"display": {
"translationKey": "action_create_card",
"entities": {
"card": {
"type": "card",
"id": "5f7073311f0aab7e1c3dd44b",
"shortLink": "Iy3XGStt",
"text": "test item"
},
"list": {
"type": "list",
"id": "5f70732bb7991045f878901e",
"text": "todos"
},
"memberCreator": {
"type": "member",
"id": "5f4fbba99b140e21cceebdb1",
"username": "theowenyoung",
"text": "Owen Young"
}
}
},
"memberCreator": {
"id": "5f4fbba99b140e21cceebdb1",
"username": "theowenyoung",
"activityBlocked": false,
"avatarHash": "6f3911adf8ac1a7d23b57329dd2412dc",
"avatarUrl": "https://trello-members.s3.amazonaws.com/5f4fbba99b140e21cceebdb1/6f3911adf8ac1a7d23b57329dd2412dc",
"fullName": "Owen Young",
"idMemberReferrer": null,
"initials": "OY",
"nonPublic": {},
"nonPublicAvailable": true
}
}
}
您可以像这样使用输出:
on:
trello:
jobs:
print:
name: Print
runs-on: ubuntu-latest
steps:
- name: Print Outputs
env:
outputs: ${{ toJSON(on.trello.outputs)}}
run: |
echo outputs: $outputs
@actionsflow/trigger-trello
This is a trello trigger of Actionsflow. Any new action in Trello will trigger the trigger.
This is an official trigger, you don't need to install it manually.
Prerequisites
You should Create a webhook at trello with API, and set https://webhook.actionsflow.workers.dev/<owner>/<repo>/<workflow-file-name>/trello?__token=<your-github-personal-token>
as your endpoint, a CURL example:
curl --request POST \
--data-urlencode "callbackURL=https://webhook.actionsflow.workers.dev/<owner>/<repo>/<workflow-file-name>/trello?__token=<your-github-personal-token>" \
--url 'https://api.trello.com/1/webhooks/?key=0471642aefef5fa1fa76530ce1ba4c85&token=9eb76d9a9d02b8dd40c2f3e5df18556c831d4d1fadbe2c45f8310e6c93b5c548&idModel=5abbe4b7ddc1b351ef961414' \
--header 'Accept: application/json'
You can the trello key at here, and generate a token for you.
You can get
idModel
bycurl https://api.trello.com/1/members/me/boards?key={yourKey}&token={yourToken}
Usage
on:
trello:
Options
There is nothing can be specified. You can use General Config for Actionsflow Trigger for more customization.
Outputs
This trigger's outputs will be the body of the aws sns message body, you can see it here
An outputs example:
{
"model": {
"id": "5f4fbbc5250c34138444068d",
"name": "ideas",
"desc": "",
"descData": null,
"closed": false,
"idOrganization": null,
"idEnterprise": null,
"pinned": false,
"url": "https://trello.com/b/iCZf1Oev/ideas",
"shortUrl": "https://trello.com/b/iCZf1Oev",
"prefs": {
"permissionLevel": "private",
"hideVotes": false,
"voting": "disabled",
"comments": "members",
"invitations": "members",
"selfJoin": true,
"cardCovers": true,
"isTemplate": false,
"cardAging": "regular",
"calendarFeedEnabled": false,
"background": "lime",
"backgroundImage": null,
"backgroundImageScaled": null,
"backgroundTile": false,
"backgroundBrightness": "dark",
"backgroundColor": "#4BBF6B",
"backgroundBottomColor": "#4BBF6B",
"backgroundTopColor": "#4BBF6B",
"canBePublic": true,
"canBeEnterprise": true,
"canBeOrg": true,
"canBePrivate": true,
"canInvite": true
},
"labelNames": {
"green": "",
"yellow": "",
"orange": "",
"red": "",
"purple": "",
"blue": "",
"sky": "",
"lime": "",
"pink": "",
"black": ""
}
},
"action": {
"id": "5f7073311f0aab7e1c3dd44c",
"idMemberCreator": "5f4fbba99b140e21cceebdb1",
"data": {
"card": {
"id": "5f7073311f0aab7e1c3dd44b",
"name": "test item",
"idShort": 2,
"shortLink": "Iy3XGStt"
},
"list": { "id": "5f70732bb7991045f878901e", "name": "todos" },
"board": {
"id": "5f4fbbc5250c34138444068d",
"name": "ideas",
"shortLink": "iCZf1Oev"
}
},
"type": "createCard",
"date": "2020-09-27T11:10:41.983Z",
"limits": {},
"appCreator": null,
"display": {
"translationKey": "action_create_card",
"entities": {
"card": {
"type": "card",
"id": "5f7073311f0aab7e1c3dd44b",
"shortLink": "Iy3XGStt",
"text": "test item"
},
"list": {
"type": "list",
"id": "5f70732bb7991045f878901e",
"text": "todos"
},
"memberCreator": {
"type": "member",
"id": "5f4fbba99b140e21cceebdb1",
"username": "theowenyoung",
"text": "Owen Young"
}
}
},
"memberCreator": {
"id": "5f4fbba99b140e21cceebdb1",
"username": "theowenyoung",
"activityBlocked": false,
"avatarHash": "6f3911adf8ac1a7d23b57329dd2412dc",
"avatarUrl": "https://trello-members.s3.amazonaws.com/5f4fbba99b140e21cceebdb1/6f3911adf8ac1a7d23b57329dd2412dc",
"fullName": "Owen Young",
"idMemberReferrer": null,
"initials": "OY",
"nonPublic": {},
"nonPublicAvailable": true
}
}
}
You can use the outputs like this:
on:
trello:
jobs:
print:
name: Print
runs-on: ubuntu-latest
steps:
- name: Print Outputs
env:
outputs: ${{ toJSON(on.trello.outputs)}}
run: |
echo outputs: $outputs
你可能也喜欢
- 2o3t-icon-font 中文文档教程
- 7shifts 中文文档教程
- @01ht/ht-animated-image 中文文档教程
- @0xsequence/erc20-meta-token 中文文档教程
- @3yourmind/vue-use-tippy 中文文档教程
- @abcum/ember-gridlist 中文文档教程
- @abcwallet/packager 中文文档教程
- @abi-software/mapcore-augmented-results 中文文档教程
- @ability-ocean/interfaces 中文文档教程
- @abramltd/jwt-oauth2-middleware 中文文档教程