标签: github-webhook

当我不拥有的公共 Github 存储库获得新提交时,如何触发 WebHook?

每当公共 Github 存储库获得新提交时,是否可以触发 Webhook。我尝试在 Zapier 和其他自动化工具上查看,但它们都要求我成为该存储库的所有者。

github git-commit github-webhook

5
推荐指数
0
解决办法
358
查看次数

使用 github webhook 读取文档导致 400:“有效负载无效、无效或缺少签名”

我已按照https://docs.readthedocs.io/en/stable/webhooks.html上的说明操作,并向 github 添加了一个 webhook 以触发我构建的 readthedocs,但是 readthedocs 拒绝了有效负载:

Response

Status:
    400
Content-Type:
    text/html; charset=utf-8
Allow:
    POST, OPTIONS
Run Code Online (Sandbox Code Playgroud)

细节:

{
  "detail": "Payload not valid, invalid or missing signature"
}
Run Code Online (Sandbox Code Playgroud)

这是请求的标头:

Host:
    ...
Connection:
    close
Accept:
    */*
Max-Forwards:
    10
User-Agent:
    GitHub-Hookshot/903858c
X-Github-Event:
    push
X-Github-Delivery:
    2be06d44-552f-11e9-91f6-d1c2bea59bd2
X-Original-Host:
    readthedocs.org
X-Original-Url:
    /api/v2/webhook/.../.../
X-Arr-Ssl:
    2048|256|C=GB, S=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Domain Validation Secure Server CA|OU=Domain Control Validated, OU=EssentialSSL Wildcard, CN=*.readthedocs.org
X-Arr-Log-Id:
    fef5ee2e-6edd-4386-ad1f-79400cee2d46
Content-Type:
    application/json 
Run Code Online (Sandbox Code Playgroud)

带有效载荷:

{
  "after": "..."
  "base_ref": null,
  "before": …
Run Code Online (Sandbox Code Playgroud)

github github-api read-the-docs github-webhook

3
推荐指数
1
解决办法
498
查看次数

AWS Codepipeline Github Webhook未通过cloudformation注册

我正在尝试通过使用cloudformation设置AWS代码管道并使用github作为源。github存储库由一个组织拥有,我对此具有管理员访问权限。

我能够创建webhook并通过代码管道UI成功创建了整个服务。但是,当我尝试通过Cloudformation Document做同样的事情时,它返回错误

Webhook could not be registered with GitHub. Error cause: Not found [StatusCode: 404, Body: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/repos/hooks/#create-a-hook"}]

我两次都使用了相同的凭据(cloudformation中的OAuth令牌和codepipeline UI中的实际登录弹出窗口),但是当我通过Cloudformation进行操作时,它失败了。

我怀疑我的cloudformation文档是问题所在。但是,当我创建自己的存储库时,cloudformation成功创建了webhook并创建了完整的代码管道服务。

以下是我为了解错误原因所做的测试摘要。

  1. Codepipeline用户界面。组织Github回购。它要求登录github。使用我的管理员凭据登录=>成功创建了Webhook和服务。
  2. Cloudformation。组织Github回购。已启用repoadmin:repo_hook启用了来自管理员凭据的OAuth令牌。=>给出上面的错误
  3. Cloudformation。个人Github回购。已使用来自管理员凭据的Oauth令牌,repo并已admin:repo_hook启用=>成功创建了Webhook和服务

以下是我创建Webhook的cloudformation文档的一部分。

  AppPipelineWebhook:
    Type: 'AWS::CodePipeline::Webhook'
    Properties:
      Authentication: GITHUB_HMAC
      AuthenticationConfiguration:
        SecretToken: !Ref GitHubSecret
      Filters:
        - JsonPath: $.ref
          MatchEquals: 'refs/heads/{Branch}'
      TargetPipeline: !Ref cfSSMAutomationDev
      TargetAction: SourceAction
      Name: AppPipelineWebhook
      TargetPipelineVersion: !GetAtt cfSSMAutomationDev.Version
      RegisterWithThirdParty: true
Run Code Online (Sandbox Code Playgroud)

所以我不确定是什么问题。我怀疑OAuth令牌需要更多特权。有人对此有类似的经验吗?任何建议深表感谢

amazon-web-services aws-codepipeline github-webhook

3
推荐指数
1
解决办法
457
查看次数

用于拒绝 Github 分支名称和提交消息推送的自定义 WebHook

我正在尝试在 Github 中设置一个预接收钩子,我们将使用它来避免不必要的提交。我正在寻找一些需要维护的规则

需要自定义提交消息。每次提交都应在开始示例中包含现有的 JIRAJIRA-XXX | Commit message

对任何拉取请求也强制执行此操作。

需要分支名称格式。

例子:abc_devName_some_br_name_jira_XXX

这里有人可以帮助我吗,这该怎么办?

git github webhooks git-branch github-webhook

3
推荐指数
1
解决办法
3081
查看次数