0

我正在查看 Bitbucket Cloud的 webhook 文档: https ://confluence.atlassian.com/bitbucket/manage-webhooks-735643732.html

我可以向 url 字段中的 url 发送 GET 请求,但我想发送更改的分支的提交或 PR id,以便我可以将请求发送回 Bitbucket 以更新 Bitbucket 的 UI。有没有办法在 webhooks 表单的 url 字段中包含动态值?

4

1 回答 1

0

Bitbucket 将在请求正文中为您发送信息,而不是在查询参数中,如下所示:

 { push: { changes: [ [Object] ] },
  actor: 
   { username: 'ntrs_oleg',
     display_name: 'Foo',
     uuid: '{c0e09bb2-26e-f89afe7b1b2c}',
     links: { self: [Object], html: [Object], avatar: [Object] },
     nickname: 'interos_alex',
     type: 'user',
     account_id: '5cc0db15c66f0ffe44c597' },
  repository: 
   { scm: 'git',
     website: '',
     name: 'jenkins-jobs',
     links: { self: [Object], html: [Object], avatar: [Object] },
     project: 
      { key: 'DEVOPS',
        type: 'project',
        uuid: '{2dc188bd997eaa244d9}',
        links: [Object],
        name: 'devops' },
     full_name: 'interos/jenkins-jobs',
     owner: 
      { username: 'interos',
        display_name: 'Interos',
        type: 'team',
        uuid: '{d4ee7ec3-04fce894572}',
        links: [Object] },
     type: 'repository',
     is_private: true,
     uuid: '{4c6795ff-362eb64d935b9}' } }
于 2019-05-15T00:29:13.343 回答