发送给AmazonSNS的pull_request的Github钩子

时间:2013-09-28 04:33:05

标签: github amazon-web-services

我见过(并测试过)GitHub与Amazon SNS的集成。但是,似乎没有办法指定要挂钩的事件(至少在UI中)。推进工作正常。有没有办法挂钩拉取请求并让它将事件推送到sns主题?

注意:如果有相关文档,我无法找到它。请在回复中附上一个链接。

2 个答案:

答案 0 :(得分:3)

补充OP的答案:

  • 您需要通过the list hooks endpointGET /repos/:owner/:repo/hooks
  • 获取amazon sns集成挂钩ID
  • 一旦您拥有相应的ID,您需要通过the edit a hook endpointPATCH /repos/:owner/:repo/hooks/:id
  • 添加/删除支持的事件

我个人并不知道整合被视为"通常"网络挂接。

答案 1 :(得分:0)

仅供参考,对于未来的读者,我想我找到了自己的答案。我找到了以下内容:

 {
    "name": "amazonsns",
    "events": [
        "push"
    ],
    "supported_events": [
        "commit_comment",
        "create",
        "delete",
        "download",
        "follow",
        "fork",
        "fork_apply",
        "gist",
        "gollum",
        "issue_comment",
        "issues",
        "member",
        "public",
        "pull_request",
        "pull_request_review_comment",
        "push",
        "status",
        "team_add",
        "watch"
    ],
    "schema": [
        [
            "string",
            "aws_key"
        ],
        [
            "string",
            "aws_secret"
        ],
        [
            "string",
            "sns_topic"
        ],
        [
            "string",
            "sqs_queue"
        ],
        [
            "password",
            "aws_secret"
        ]
    ]

}

这是:https://api.github.com/hooks