{"id":14985947,"url":"https://github.com/junka/feishu-bot-webhook-action","last_synced_at":"2025-04-11T22:13:03.726Z","repository":{"id":237180897,"uuid":"793971763","full_name":"junka/feishu-bot-webhook-action","owner":"junka","description":"Monitor and send github events to feishu bot","archived":false,"fork":false,"pushed_at":"2024-08-19T01:33:12.000Z","size":34652,"stargazers_count":11,"open_issues_count":5,"forks_count":13,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T22:12:57.049Z","etag":null,"topics":["action","bot","feishu","github"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/junka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-30T08:04:34.000Z","updated_at":"2025-03-04T02:31:01.000Z","dependencies_parsed_at":"2024-08-04T18:51:33.267Z","dependency_job_id":"da581ef0-6796-4870-9744-6940653553da","html_url":"https://github.com/junka/feishu-bot-webhook-action","commit_stats":null,"previous_names":["junka/feishu-bot-webhook-action"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junka%2Ffeishu-bot-webhook-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junka%2Ffeishu-bot-webhook-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junka%2Ffeishu-bot-webhook-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junka%2Ffeishu-bot-webhook-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junka","download_url":"https://codeload.github.com/junka/feishu-bot-webhook-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487684,"owners_count":21112190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","bot","feishu","github"],"created_at":"2024-09-24T14:11:59.637Z","updated_at":"2025-04-11T22:13:03.700Z","avatar_url":"https://github.com/junka.png","language":"TypeScript","readme":"## feishu-bot-webhook-action\n\n![CI](https://github.com/junka/feishu-bot-webhook-action/actions/workflows/ci.yml/badge.svg)\n[![Coverage](./badges/coverage.svg)](./badges/coverage.svg)\n\n- What is this for? Send Github events to Feishu Bot, but in the format that\n  Feishu recognises.\n\n- 作何用途？利用github action发送事件消息到飞书自定义机器人/机器人\n\n#### Add custom bot to a group in your Feishu app.\n\n#### 添加一个自定义机器人到你的飞书群\n\nIn the bot setting, copy the webhook url and configure it to the action secrets\nas `FEISHU_BOT_WEBHOOK`.\n\n在自定义机器人设置界面，拷贝webhook url并配置到github仓库的action secrets中，命\n名为`FEISHU_BOT_WEBHOOK`\n\nIf you enable the signature verify in the bot setting, copy the signkey to\nsecrets too, name it as `FEISHU_BOT_SIGNKEY`\n\n如果你启用了签名校验，那么请将签名密钥也拷贝到secrets中，命名\n为`FEISHU_BOT_SIGNKEY`\n\n#### Add action workflow\n\n#### 添加一个action workfow\n\ncustom the events you care\n\n自定义你所关心的事件\n\n```yaml\nname: feishu bot\n\non:\n  branch_protection_rule:\n    types: [created, deleted]\n  check_run:\n    types: [rerequested, completed]\n  check_suite:\n    types: [completed]\n  create:\n  delete:\n  deployment_status:\n  discussion:\n    types: [created, edited, answered]\n  discussion_comment:\n    types: [created, deleted]\n  fork:\n  gollum:\n  issues:\n    types: [opened, edited, milestoned, pinned, reopened]\n  issue_comment:\n    types: [created, deleted]\n  label:\n    types: [created, deleted]\n  merge_group:\n    types: [checks_requested]\n  milestone:\n    types: [opened, deleted]\n  page_build:\n  project:\n    types: [created, deleted, reopened]\n  project_card:\n    types: [created, deleted]\n  project_column:\n    types: [created, deleted]\n  public:\n  pull_request:\n    branches: ['main']\n    types: [opened, reopened]\n  pull_request_review:\n    types: [edited, dismissed, submitted]\n  pull_request_review_comment:\n    types: [created, edited, deleted]\n  pull_request_target:\n    types: [assigned, opened, synchronize, reopened]\n  push:\n    branches: ['main']\n  registry_package:\n    types: [published]\n  release:\n    types: [published]\n  status:\n  watch:\n    types: [started]\n  schedule:\n    - cron: '30 2 * * *'\n\njobs:\n  send-event:\n    name: Webhook\n    runs-on: ubuntu-latest\n    steps:\n      - uses: junka/feishu-bot-webhook-action@main\n        with:\n          webhook: ${{ secrets.FEISHU_BOT_WEBHOOK }}\n          signkey: ${{ secrets.FEISHU_BOT_SIGNKEY }}\n```\n\n#### Action Input\n\nAs you can see that in the example workflow yaml file, you need the following\ninput variables.\n\n如上面例子展示的工作流的yaml文件所示，你需要关注以下输入变量。\n\n- `webhook`: required, the webhook url for the custom bot. 必需，自定义机器人的\n  回调webhook\n- `signkey`: optional, the sign key for the bot when you enable the signature\n  verification. 可选，自定义机器人的签名密钥，当启用签名校验时需要\n\nPlease configure `FEISHU_BOT_WEBHOOK` and `FEISHU_BOT_SIGNKEY` in the repo,\n`Setting` -\u003e `Secrets and variables` -\u003e `Actions` -\u003e `New Repository secrets`\n\n请在仓库的设置中配置`FEISHU_BOT_WEBHOOK`和 `FEISHU_BOT_SIGNKEY` , 路径`Setting`\n-\u003e `Secrets and variables` -\u003e `Actions` -\u003e `New Repository secrets`.\n\nIn the sample above `schedule` event will post github trending to bot every day\nat 2:30 UTC time. 上面例子中配置的`schedule` 事件会在每天UTC时间2:30发送github\ntredning到机器人。\n\n#### For those who want to build your own card\n\n#### 建立自己的消息卡片\n\nyou can fork the action and modify as below你可以fork项目并依据以下步骤修改\n\n- Create a card here https://open.feishu.cn/cardkit\n- 在这里新建一个卡片\n- replace the card template id and varibales in the code\n- 替换代码中的卡片模版id和变量\n\n```\"card\": {\n            \"type\": \"template\",\n            \"data\": {\n                \"template_id\": \"AAqkeNyiypMLb\",\n                \"template_version_name\": \"1.0.6\",\n                \"template_variable\": {\n                    \"repo\": \"${repo}\",\n                    \"eventType\": \"${eventType}\",\n                    \"themeColor\": \"${color}\",\n                    \"auser\": \"${actor}\",\n                    \"avatar\": \"${avatar}\",\n                    \"status\": \"${status}\",\n                    \"etitle\": \"${etitle}\",\n                    \"detailurl\": \"${detailurl}\"\n                }\n            }\n        }\n```\n\nThis card is for event notification, there is another for github trending. You\ncan modify that as you wish. 这个卡片是做事件通知的，也有一个做github trending的\n卡片，你也可以安需要修改。\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunka%2Ffeishu-bot-webhook-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunka%2Ffeishu-bot-webhook-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunka%2Ffeishu-bot-webhook-action/lists"}