Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Conversation

@BosAtWork
Copy link
Contributor

Issue #, if available:
JSON format of webhook of bitbucket server 6.6.2 is not supported and slighly different than normal Bitbucket.

Description of changes:
Added support for bitbucket server 6.6.2 as the json is slighly different and the branch name is in a different path.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sample json that bitbucket server 6.6.2 sends as hook

{
   "eventKey":"repo:refs_changed",
   "date":"2020-01-14T16:30:45+0100",
   "actor":{
      "name":"****",
      "emailAddress":"****",
      "id":8361,
      "displayName":"****",
      "active":true,
      "slug":"****",
      "type":"NORMAL",
      "links":{
         "self":[
            {
               "href":"****"
            }
         ]
      }
   },
   "repository":{
      "slug":"****",
      "id":2659,
      "name":"****",
      "scmId":"git",
      "state":"AVAILABLE",
      "statusMessage":"Available",
      "forkable":false,
      "project":{
         "key":"****",
         "id":2264,
         "name":"****",
         "description":"****",
         "public":false,
         "type":"NORMAL",
         "links":{
            "self":[
               {
                  "href":"****"
               }
            ]
         }
      },
      "public":false,
      "links":{
         "clone":[
            {
               "href":"****.git",
               "name":"http"
            },
            {
               "href":"ssh://git@****.git",
               "name":"ssh"
            }
         ],
         "self":[
            {
               "href":"https://****/browse"
            }
         ]
      }
   },
   "changes":[
      {
         "ref":{
            "id":"refs/heads/hotfix/transfer-should-be-checked",
            "displayId":"hotfix/transfer-should-be-checked",
            "type":"BRANCH"
         },
         "refId":"refs/heads/hotfix/transfer-should-be-checked",
         "fromHash":"0000000000000000000000000000000000000000",
         "toHash":"4a24622fd85f304770079a8b4dbf9566ea1928c5",
         "type":"ADD"
      }
   ]
}

Sample json that bitbucket server 6.6.2 sends as hook
{
   "eventKey":"repo:refs_changed",
   "date":"2020-01-14T16:30:45+0100",
   "actor":{
      "name":"****",
      "emailAddress":"****",
      "id":8361,
      "displayName":"****",
      "active":true,
      "slug":"****",
      "type":"NORMAL",
      "links":{
         "self":[
            {
               "href":"****"
            }
         ]
      }
   },
   "repository":{
      "slug":"****",
      "id":2659,
      "name":"****",
      "scmId":"git",
      "state":"AVAILABLE",
      "statusMessage":"Available",
      "forkable":false,
      "project":{
         "key":"****",
         "id":2264,
         "name":"****",
         "description":"****",
         "public":false,
         "type":"NORMAL",
         "links":{
            "self":[
               {
                  "href":"****"
               }
            ]
         }
      },
      "public":false,
      "links":{
         "clone":[
            {
               "href":"****.git",
               "name":"http"
            },
            {
               "href":"ssh://git@****.git",
               "name":"ssh"
            }
         ],
         "self":[
            {
               "href":"https://****/browse"
            }
         ]
      }
   },
   "changes":[
      {
         "ref":{
            "id":"refs/heads/hotfix/transfer-should-be-checked",
            "displayId":"hotfix/transfer-should-be-checked",
            "type":"BRANCH"
         },
         "refId":"refs/heads/hotfix/transfer-should-be-checked",
         "fromHash":"0000000000000000000000000000000000000000",
         "toHash":"4a24622fd85f304770079a8b4dbf9566ea1928c5",
         "type":"ADD"
      }
   ]
}
@BosAtWork BosAtWork requested a review from jaymccon February 24, 2020 08:29
@BosAtWork
Copy link
Contributor Author

@jaymccon Is there any chance this might be looked at. At the moment our organization has to have extra step in the deployment guidelines to fix the lambda code manually after deploying this quickstart.

@jaymccon jaymccon changed the base branch from master to develop August 14, 2020 21:15
@jaymccon jaymccon merged commit 30cd288 into aws-quickstart:develop Aug 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants