将逾期功能发送至Slack

为Slack添加过期功能
警告: 警告:示例URL! 请务必替换

https://hooks.slack.com/services/xxxxx/yyyyyy/zzzzzzzzztGRAKwHLfm4kw

通过您的 Slack Webhook URL 以及 https://youraccount.tpondemand.com/ 您的 Targetprocess URL
[
  {
    "type": "source:schedule",
    "schedule": {
      "kind": "interval",
      "unit": "hour",
      "value": 24
    }
  },
  {
    "type": "action:JavaScript",
    "script": "const api = context.getService(\"targetprocess/api/v2\");\n\n//get the list of overdue features\nconst features = await api.queryAsync(\"Feature\", {\n  select: \"{id, name}\",\n  where: ___PROTECTED_4___\n});\n\n//IMPORTANT: Change the account name below\nconst featureLinks = features.map(feature => {\n  return ___PROTECTED_5___;\n});\n\n//IMPORTANT: Update Slack link below\nreturn {\n  command: \"SendHttpRequest\",\n  payload: {\n    url: \"https://hooks.slack.com/services/xxxxx/yyyyyy/zzzzzzzzztGRAKwHLfm4kw\",\n    body: {\n      text: ___PROTECTED_6___,\n      username: \"TP\"\n    }\n  }\n};"
  }
]