From 5c1b9629b290add8dad9df0190a2befc15028511 Mon Sep 17 00:00:00 2001 From: Rick van der Staaij Date: Wed, 10 Jul 2024 16:57:32 +0200 Subject: [PATCH] Create bitbucket pull request parser stub --- backend/parser/bitbucket/index.ts | 14 + backend/router/route/webhook/bitbucket.ts | 2 + .../commit_status_created--last.json | 187 ------ ...commit_status_created--nick-success-2.json | 187 ------ .../commit_status_created--nick-success.json | 187 ------ .../bitbucket/temporary/pr-updated.json | 460 ------------- .../temporary/repo_push--bjorn-change.json | 635 ------------------ types/bitbucket.ts | 46 +- 8 files changed, 47 insertions(+), 1671 deletions(-) delete mode 100644 cypress/fixtures/bitbucket/temporary/commit_status_created--last.json delete mode 100644 cypress/fixtures/bitbucket/temporary/commit_status_created--nick-success-2.json delete mode 100644 cypress/fixtures/bitbucket/temporary/commit_status_created--nick-success.json delete mode 100644 cypress/fixtures/bitbucket/temporary/pr-updated.json delete mode 100644 cypress/fixtures/bitbucket/temporary/repo_push--bjorn-change.json diff --git a/backend/parser/bitbucket/index.ts b/backend/parser/bitbucket/index.ts index 08ff4e6..34e2c21 100644 --- a/backend/parser/bitbucket/index.ts +++ b/backend/parser/bitbucket/index.ts @@ -2,6 +2,7 @@ import Slugify from 'backend/parser/slug'; import { BitBucketChangeWrapper, BitBucketCommitStatusWebhook, + BitBucketPullRequestWebhook, BitBucketPushWebhook, BitBucketRepository, } from 'types/bitbucket'; @@ -53,6 +54,19 @@ class BitBucketParser { return BitBucketBuildParser.parse(id, build); } + + parsePullRequest(pr: BitBucketPullRequestWebhook): Status { + console.log('[parser/bitbucket] Parsing pull request...'); + + const id = this.getInternalId(pr.repository, pr.pullrequest.source.branch.name); + + // TODO: parse the PR + console.log('[parser/bitbucket] TODO.'); + id; + return null; + + // return BitBucketPullRequestParser.parse(id, build); + } } export default new BitBucketParser(); diff --git a/backend/router/route/webhook/bitbucket.ts b/backend/router/route/webhook/bitbucket.ts index bd9729f..a963602 100644 --- a/backend/router/route/webhook/bitbucket.ts +++ b/backend/router/route/webhook/bitbucket.ts @@ -23,6 +23,8 @@ router.post('/', (request, response) => { break; case 'pullrequest:created': case 'pullrequest:updated': + status = Parser.parsePullRequest(request.body); + break; default: console.log(`[route/webhook/bitbucket] No parser for webhook type ${webhookType}.`); } diff --git a/cypress/fixtures/bitbucket/temporary/commit_status_created--last.json b/cypress/fixtures/bitbucket/temporary/commit_status_created--last.json deleted file mode 100644 index a2224d0..0000000 --- a/cypress/fixtures/bitbucket/temporary/commit_status_created--last.json +++ /dev/null @@ -1,187 +0,0 @@ -{ - "headers": { - "user-agent": "Bitbucket-Webhooks/2.0", - "content-type": "application/json", - "x-event-key": "repo:commit_status_created" - }, - "body": { - "repository": { - "type": "repository", - "full_name": "groupname/xo", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo" - }, - "avatar": { - "href": "https://bytebucket.org/ravatar/%7B05740f13-ee26-40c5-b530-4d204854fea1%7D?ts=3379276" - } - }, - "name": "XO", - "scm": "git", - "website": null, - "owner": { - "display_name": "Development groupname", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/DL-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D/" - } - }, - "type": "user", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "account_id": "5a6a0877bae36d1ee1890185", - "nickname": "Development groupname" - }, - "workspace": { - "type": "workspace", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "name": "Development groupname", - "slug": "groupname", - "links": { - "avatar": { - "href": "https://bitbucket.org/workspaces/groupname/avatar/?ts=1677682798" - }, - "html": { - "href": "https://bitbucket.org/groupname/" - }, - "self": { - "href": "https://api.bitbucket.org/2.0/workspaces/groupname" - } - } - }, - "is_private": true, - "project": { - "type": "project", - "key": "PROJ", - "uuid": "{e3a2a754-7d0a-4616-a892-8acd318d7ab1}", - "name": "Software", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/workspaces/groupname/projects/PROJ" - }, - "html": { - "href": "https://bitbucket.org/groupname/workspace/projects/PROJ" - }, - "avatar": { - "href": "https://bitbucket.org/account/user/groupname/projects/PROJ/avatar/32?ts=1593421915" - } - } - }, - "uuid": "{05740f13-ee26-40c5-b530-4d204854fea1}", - "parent": null - }, - "actor": { - "display_name": "Development groupname", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/DL-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D/" - } - }, - "type": "user", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "account_id": "5a6a0877bae36d1ee1890185", - "nickname": "Development groupname" - }, - "commit_status": { - "key": "2067324061", - "type": "build", - "state": "INPROGRESS", - "name": "Pipeline #3508 for Pull Request #411", - "refname": "feature/XO-430", - "commit": { - "type": "commit", - "hash": "d9d630922014376b13837e1d9109f7016f961840", - "date": "2024-07-10T09:22:58+00:00", - "author": { - "type": "author", - "raw": "Marc <[REDACTED]>", - "user": { - "display_name": "Marc", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7Bb3d09cea-ea4a-46c1-aef4-eb2904f6820b%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/MR-4.png" - }, - "html": { - "href": "https://bitbucket.org/%7Bb3d09cea-ea4a-46c1-aef4-eb2904f6820b%7D/" - } - }, - "type": "user", - "uuid": "{b3d09cea-ea4a-46c1-aef4-eb2904f6820b}", - "account_id": "712020:9d68805c-afe3-47be-ae4e-85c8114c27b7", - "nickname": "Marc" - } - }, - "message": "XO-430: Fix minor code issues\n", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/d9d630922014376b13837e1d9109f7016f961840" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/d9d630922014376b13837e1d9109f7016f961840" - }, - "diff": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/diff/d9d630922014376b13837e1d9109f7016f961840" - }, - "approve": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/d9d630922014376b13837e1d9109f7016f961840/approve" - }, - "comments": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/d9d630922014376b13837e1d9109f7016f961840/comments" - }, - "statuses": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/d9d630922014376b13837e1d9109f7016f961840/statuses" - }, - "patch": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/patch/d9d630922014376b13837e1d9109f7016f961840" - } - } - }, - "url": "https://bitbucket.org/groupname/xo/addon/pipelines/home#!/results/3508", - "repository": { - "type": "repository", - "full_name": "groupname/xo", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo" - }, - "avatar": { - "href": "https://bytebucket.org/ravatar/%7B05740f13-ee26-40c5-b530-4d204854fea1%7D?ts=3379276" - } - }, - "name": "XO", - "uuid": "{05740f13-ee26-40c5-b530-4d204854fea1}" - }, - "description": "", - "created_on": "2024-07-10T09:23:33.487047+00:00", - "updated_on": "2024-07-10T09:23:33.487059+00:00", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/d9d630922014376b13837e1d9109f7016f961840/statuses/build/2067324061" - }, - "commit": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/d9d630922014376b13837e1d9109f7016f961840" - } - } - } - } -} diff --git a/cypress/fixtures/bitbucket/temporary/commit_status_created--nick-success-2.json b/cypress/fixtures/bitbucket/temporary/commit_status_created--nick-success-2.json deleted file mode 100644 index 7cfcdce..0000000 --- a/cypress/fixtures/bitbucket/temporary/commit_status_created--nick-success-2.json +++ /dev/null @@ -1,187 +0,0 @@ -{ - "headers": { - "user-agent": "Bitbucket-Webhooks/2.0", - "content-type": "application/json", - "x-event-key": "repo:commit_status_created" - }, - "body": { - "repository": { - "type": "repository", - "full_name": "groupname/xo", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo" - }, - "avatar": { - "href": "https://bytebucket.org/ravatar/%7B05740f13-ee26-40c5-b530-4d204854fea1%7D?ts=3379276" - } - }, - "name": "XO", - "scm": "git", - "website": null, - "owner": { - "display_name": "Development groupname", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/DL-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D/" - } - }, - "type": "user", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "account_id": "5a6a0877bae36d1ee1890185", - "nickname": "Development groupname" - }, - "workspace": { - "type": "workspace", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "name": "Development groupname", - "slug": "groupname", - "links": { - "avatar": { - "href": "https://bitbucket.org/workspaces/groupname/avatar/?ts=1677682798" - }, - "html": { - "href": "https://bitbucket.org/groupname/" - }, - "self": { - "href": "https://api.bitbucket.org/2.0/workspaces/groupname" - } - } - }, - "is_private": true, - "project": { - "type": "project", - "key": "PROJ", - "uuid": "{e3a2a754-7d0a-4616-a892-8acd318d7ab1}", - "name": "Software", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/workspaces/groupname/projects/PROJ" - }, - "html": { - "href": "https://bitbucket.org/groupname/workspace/projects/PROJ" - }, - "avatar": { - "href": "https://bitbucket.org/account/user/groupname/projects/PROJ/avatar/32?ts=1593421915" - } - } - }, - "uuid": "{05740f13-ee26-40c5-b530-4d204854fea1}", - "parent": null - }, - "actor": { - "display_name": "Development groupname", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/DL-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D/" - } - }, - "type": "user", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "account_id": "5a6a0877bae36d1ee1890185", - "nickname": "Development groupname" - }, - "commit_status": { - "key": "sc-groupname_XO_backend", - "type": "build", - "state": "SUCCESSFUL", - "name": "SonarCloud - XO_backend", - "refname": null, - "commit": { - "type": "commit", - "hash": "240c78ed4c4968bf9637a1ca021378ba08c0f300", - "date": "2024-07-03T14:49:08+00:00", - "author": { - "type": "author", - "raw": "Nick [REDACTED] <[REDACTED]>", - "user": { - "display_name": "Nick", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B439374be-ee4d-411c-b153-0b768303ac74%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/N-5.png" - }, - "html": { - "href": "https://bitbucket.org/%7B439374be-ee4d-411c-b153-0b768303ac74%7D/" - } - }, - "type": "user", - "uuid": "{439374be-ee4d-411c-b153-0b768303ac74}", - "account_id": "712020:343fef7f-3815-42cb-bd8f-f22fd8d6676d", - "nickname": "Nick" - } - }, - "message": "Updates based on formcontext\n", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/240c78ed4c4968bf9637a1ca021378ba08c0f300" - }, - "diff": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/diff/240c78ed4c4968bf9637a1ca021378ba08c0f300" - }, - "approve": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300/approve" - }, - "comments": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300/comments" - }, - "statuses": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300/statuses" - }, - "patch": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/patch/240c78ed4c4968bf9637a1ca021378ba08c0f300" - } - } - }, - "url": "https://sonarcloud.io/dashboard?id=groupname_XO_backend&pullRequest=419", - "repository": { - "type": "repository", - "full_name": "groupname/xo", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo" - }, - "avatar": { - "href": "https://bytebucket.org/ravatar/%7B05740f13-ee26-40c5-b530-4d204854fea1%7D?ts=3379276" - } - }, - "name": "XO", - "uuid": "{05740f13-ee26-40c5-b530-4d204854fea1}" - }, - "description": "Quality Gate passed", - "created_on": "2024-07-10T09:14:19.463663+00:00", - "updated_on": "2024-07-10T09:14:19.463673+00:00", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300/statuses/build/sc-groupname_XO_backend" - }, - "commit": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300" - } - } - } - } -} diff --git a/cypress/fixtures/bitbucket/temporary/commit_status_created--nick-success.json b/cypress/fixtures/bitbucket/temporary/commit_status_created--nick-success.json deleted file mode 100644 index ef4a110..0000000 --- a/cypress/fixtures/bitbucket/temporary/commit_status_created--nick-success.json +++ /dev/null @@ -1,187 +0,0 @@ -{ - "headers": { - "user-agent": "Bitbucket-Webhooks/2.0", - "content-type": "application/json", - "x-event-key": "repo:commit_status_created" - }, - "body": { - "repository": { - "type": "repository", - "full_name": "groupname/xo", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo" - }, - "avatar": { - "href": "https://bytebucket.org/ravatar/%7B05740f13-ee26-40c5-b530-4d204854fea1%7D?ts=3379276" - } - }, - "name": "XO", - "scm": "git", - "website": null, - "owner": { - "display_name": "Development groupname", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/DL-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D/" - } - }, - "type": "user", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "account_id": "5a6a0877bae36d1ee1890185", - "nickname": "Development groupname" - }, - "workspace": { - "type": "workspace", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "name": "Development groupname", - "slug": "groupname", - "links": { - "avatar": { - "href": "https://bitbucket.org/workspaces/groupname/avatar/?ts=1677682798" - }, - "html": { - "href": "https://bitbucket.org/groupname/" - }, - "self": { - "href": "https://api.bitbucket.org/2.0/workspaces/groupname" - } - } - }, - "is_private": true, - "project": { - "type": "project", - "key": "PROJ", - "uuid": "{e3a2a754-7d0a-4616-a892-8acd318d7ab1}", - "name": "Software", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/workspaces/groupname/projects/PROJ" - }, - "html": { - "href": "https://bitbucket.org/groupname/workspace/projects/PROJ" - }, - "avatar": { - "href": "https://bitbucket.org/account/user/groupname/projects/PROJ/avatar/32?ts=1593421915" - } - } - }, - "uuid": "{05740f13-ee26-40c5-b530-4d204854fea1}", - "parent": null - }, - "actor": { - "display_name": "Development groupname", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/DL-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D/" - } - }, - "type": "user", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "account_id": "5a6a0877bae36d1ee1890185", - "nickname": "Development groupname" - }, - "commit_status": { - "key": "sc-groupname_XO_shared", - "type": "build", - "state": "SUCCESSFUL", - "name": "SonarCloud - XO_shared", - "refname": null, - "commit": { - "type": "commit", - "hash": "240c78ed4c4968bf9637a1ca021378ba08c0f300", - "date": "2024-07-03T14:49:08+00:00", - "author": { - "type": "author", - "raw": "Nick [REDACTED] <[REDACTED]>", - "user": { - "display_name": "Nick", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B439374be-ee4d-411c-b153-0b768303ac74%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/N-5.png" - }, - "html": { - "href": "https://bitbucket.org/%7B439374be-ee4d-411c-b153-0b768303ac74%7D/" - } - }, - "type": "user", - "uuid": "{439374be-ee4d-411c-b153-0b768303ac74}", - "account_id": "712020:343fef7f-3815-42cb-bd8f-f22fd8d6676d", - "nickname": "Nick" - } - }, - "message": "Updates based on formcontext\n", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/240c78ed4c4968bf9637a1ca021378ba08c0f300" - }, - "diff": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/diff/240c78ed4c4968bf9637a1ca021378ba08c0f300" - }, - "approve": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300/approve" - }, - "comments": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300/comments" - }, - "statuses": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300/statuses" - }, - "patch": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/patch/240c78ed4c4968bf9637a1ca021378ba08c0f300" - } - } - }, - "url": "https://sonarcloud.io/dashboard?id=groupname_XO_shared&pullRequest=419", - "repository": { - "type": "repository", - "full_name": "groupname/xo", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo" - }, - "avatar": { - "href": "https://bytebucket.org/ravatar/%7B05740f13-ee26-40c5-b530-4d204854fea1%7D?ts=3379276" - } - }, - "name": "XO", - "uuid": "{05740f13-ee26-40c5-b530-4d204854fea1}" - }, - "description": "Quality Gate passed", - "created_on": "2024-07-10T09:14:19.015387+00:00", - "updated_on": "2024-07-10T09:14:19.015399+00:00", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300/statuses/build/sc-groupname_XO_shared" - }, - "commit": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300" - } - } - } - } -} diff --git a/cypress/fixtures/bitbucket/temporary/pr-updated.json b/cypress/fixtures/bitbucket/temporary/pr-updated.json deleted file mode 100644 index 7987d74..0000000 --- a/cypress/fixtures/bitbucket/temporary/pr-updated.json +++ /dev/null @@ -1,460 +0,0 @@ -{ - "headers": { - "user-agent": "Bitbucket-Webhooks/2.0", - "content-type": "application/json", - "x-event-key": "pullrequest:updated" - }, - "body": { - "repository": { - "type": "repository", - "full_name": "groupname/xo", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo" - }, - "avatar": { - "href": "https://bytebucket.org/ravatar/%7B05740f13-ee26-40c5-b530-4d204854fea1%7D?ts=3379276" - } - }, - "name": "XO", - "scm": "git", - "website": null, - "owner": { - "display_name": "Development groupname", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/DL-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D/" - } - }, - "type": "user", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "account_id": "5a6a0877bae36d1ee1890185", - "nickname": "Development groupname" - }, - "workspace": { - "type": "workspace", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "name": "Development groupname", - "slug": "groupname", - "links": { - "avatar": { - "href": "https://bitbucket.org/workspaces/groupname/avatar/?ts=1677682798" - }, - "html": { - "href": "https://bitbucket.org/groupname/" - }, - "self": { - "href": "https://api.bitbucket.org/2.0/workspaces/groupname" - } - } - }, - "is_private": true, - "project": { - "type": "project", - "key": "PROJ", - "uuid": "{e3a2a754-7d0a-4616-a892-8acd318d7ab1}", - "name": "Software", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/workspaces/groupname/projects/PROJ" - }, - "html": { - "href": "https://bitbucket.org/groupname/workspace/projects/PROJ" - }, - "avatar": { - "href": "https://bitbucket.org/account/user/groupname/projects/PROJ/avatar/32?ts=1593421915" - } - } - }, - "uuid": "{05740f13-ee26-40c5-b530-4d204854fea1}", - "parent": null - }, - "actor": { - "display_name": "Björn [REDACTED]", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B99927a7f-57e1-457d-92f4-4be1a4af9137%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/BS-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B99927a7f-57e1-457d-92f4-4be1a4af9137%7D/" - } - }, - "type": "user", - "uuid": "{99927a7f-57e1-457d-92f4-4be1a4af9137}", - "account_id": "712020:d6d2db88-8e9d-4e8d-a275-93829ee8c7eb", - "nickname": "Björn [REDACTED]" - }, - "pullrequest": { - "comment_count": 9, - "task_count": 0, - "type": "pullrequest", - "id": 419, - "title": "XO-465 [FE] Wmo319 Fill in response on a Request", - "description": "## What\n\nAdd response to the 319 with all of it’s validation.\n\n## How to test\n\n1. Go to the 319\n2. There should be a new block Response\n3. All validation should work\n4. Should show an extra dropdown when choosing “Verzoek afgewezen“\n\n‌", - "rendered": { - "title": { - "type": "rendered", - "raw": "XO-465 [FE] Wmo319 Fill in response on a Request", - "markup": "markdown", - "html": "

XO-465 [FE] Wmo319 Fill in response on a Request

" - }, - "description": { - "type": "rendered", - "raw": "## What\n\nAdd response to the 319 with all of it’s validation.\n\n## How to test\n\n1. Go to the 319\n2. There should be a new block Response\n3. All validation should work\n4. Should show an extra dropdown when choosing “Verzoek afgewezen“\n\n‌", - "markup": "markdown", - "html": "

What

\n

Add response to the 319 with all of it’s validation.

\n

How to test

\n
    \n
  1. Go to the 319
  2. \n
  3. There should be a new block Response
  4. \n
  5. All validation should work
  6. \n
  7. Should show an extra dropdown when choosing “Verzoek afgewezen“
  8. \n
\n

" - } - }, - "state": "OPEN", - "merge_commit": null, - "close_source_branch": false, - "closed_by": null, - "author": { - "display_name": "Björn [REDACTED]", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B99927a7f-57e1-457d-92f4-4be1a4af9137%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/BS-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B99927a7f-57e1-457d-92f4-4be1a4af9137%7D/" - } - }, - "type": "user", - "uuid": "{99927a7f-57e1-457d-92f4-4be1a4af9137}", - "account_id": "712020:d6d2db88-8e9d-4e8d-a275-93829ee8c7eb", - "nickname": "Björn [REDACTED]" - }, - "reason": "", - "created_on": "2024-06-21T13:48:32.349423+00:00", - "updated_on": "2024-07-10T09:21:36.299676+00:00", - "destination": { - "branch": { - "name": "main" - }, - "commit": { - "hash": "a1176fc2a583", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/a1176fc2a583" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/a1176fc2a583" - } - }, - "type": "commit" - }, - "repository": { - "type": "repository", - "full_name": "groupname/xo", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo" - }, - "avatar": { - "href": "https://bytebucket.org/ravatar/%7B05740f13-ee26-40c5-b530-4d204854fea1%7D?ts=3379276" - } - }, - "name": "XO", - "uuid": "{05740f13-ee26-40c5-b530-4d204854fea1}" - } - }, - "source": { - "branch": { - "name": "feature/XO-465" - }, - "commit": { - "hash": "640b42e1b503", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/640b42e1b503" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/640b42e1b503" - } - }, - "type": "commit" - }, - "repository": { - "type": "repository", - "full_name": "groupname/xo", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo" - }, - "avatar": { - "href": "https://bytebucket.org/ravatar/%7B05740f13-ee26-40c5-b530-4d204854fea1%7D?ts=3379276" - } - }, - "name": "XO", - "uuid": "{05740f13-ee26-40c5-b530-4d204854fea1}" - } - }, - "reviewers": [ - { - "display_name": "Marcel van der Laan", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B9783fd10-b6e4-46fd-9e86-91dc730f4392%7D" - }, - "avatar": { - "href": "https://secure.gravatar.com/avatar/42300bb5091f0afe3658135b9b8ca9a0?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FML-1.png" - }, - "html": { - "href": "https://bitbucket.org/%7B9783fd10-b6e4-46fd-9e86-91dc730f4392%7D/" - } - }, - "type": "user", - "uuid": "{9783fd10-b6e4-46fd-9e86-91dc730f4392}", - "account_id": "5f74aba0c594410077143b10", - "nickname": "Marcel van der Laan" - }, - { - "display_name": "Pieter [REDACTED]", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7Bf13f3090-4b44-4dbc-bb22-900c559c0c1a%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/PW-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7Bf13f3090-4b44-4dbc-bb22-900c559c0c1a%7D/" - } - }, - "type": "user", - "uuid": "{f13f3090-4b44-4dbc-bb22-900c559c0c1a}", - "account_id": "712020:1874b931-dbea-4196-adbf-a67711461354", - "nickname": "Pieter [REDACTED]" - }, - { - "display_name": "Nick", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B439374be-ee4d-411c-b153-0b768303ac74%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/N-5.png" - }, - "html": { - "href": "https://bitbucket.org/%7B439374be-ee4d-411c-b153-0b768303ac74%7D/" - } - }, - "type": "user", - "uuid": "{439374be-ee4d-411c-b153-0b768303ac74}", - "account_id": "712020:343fef7f-3815-42cb-bd8f-f22fd8d6676d", - "nickname": "Nick" - }, - { - "display_name": "Marc", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7Bb3d09cea-ea4a-46c1-aef4-eb2904f6820b%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/MR-4.png" - }, - "html": { - "href": "https://bitbucket.org/%7Bb3d09cea-ea4a-46c1-aef4-eb2904f6820b%7D/" - } - }, - "type": "user", - "uuid": "{b3d09cea-ea4a-46c1-aef4-eb2904f6820b}", - "account_id": "712020:9d68805c-afe3-47be-ae4e-85c8114c27b7", - "nickname": "Marc" - } - ], - "participants": [ - { - "type": "participant", - "user": { - "display_name": "Pieter [REDACTED]", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7Bf13f3090-4b44-4dbc-bb22-900c559c0c1a%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/PW-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7Bf13f3090-4b44-4dbc-bb22-900c559c0c1a%7D/" - } - }, - "type": "user", - "uuid": "{f13f3090-4b44-4dbc-bb22-900c559c0c1a}", - "account_id": "712020:1874b931-dbea-4196-adbf-a67711461354", - "nickname": "Pieter [REDACTED]" - }, - "role": "REVIEWER", - "approved": false, - "state": null, - "participated_on": null - }, - { - "type": "participant", - "user": { - "display_name": "Nick", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B439374be-ee4d-411c-b153-0b768303ac74%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/N-5.png" - }, - "html": { - "href": "https://bitbucket.org/%7B439374be-ee4d-411c-b153-0b768303ac74%7D/" - } - }, - "type": "user", - "uuid": "{439374be-ee4d-411c-b153-0b768303ac74}", - "account_id": "712020:343fef7f-3815-42cb-bd8f-f22fd8d6676d", - "nickname": "Nick" - }, - "role": "REVIEWER", - "approved": true, - "state": "approved", - "participated_on": "2024-06-28T10:04:12.683424+00:00" - }, - { - "type": "participant", - "user": { - "display_name": "Marc", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7Bb3d09cea-ea4a-46c1-aef4-eb2904f6820b%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/MR-4.png" - }, - "html": { - "href": "https://bitbucket.org/%7Bb3d09cea-ea4a-46c1-aef4-eb2904f6820b%7D/" - } - }, - "type": "user", - "uuid": "{b3d09cea-ea4a-46c1-aef4-eb2904f6820b}", - "account_id": "712020:9d68805c-afe3-47be-ae4e-85c8114c27b7", - "nickname": "Marc" - }, - "role": "REVIEWER", - "approved": false, - "state": null, - "participated_on": "2024-06-24T14:01:18.645567+00:00" - }, - { - "type": "participant", - "user": { - "display_name": "Marcel van der Laan", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B9783fd10-b6e4-46fd-9e86-91dc730f4392%7D" - }, - "avatar": { - "href": "https://secure.gravatar.com/avatar/42300bb5091f0afe3658135b9b8ca9a0?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FML-1.png" - }, - "html": { - "href": "https://bitbucket.org/%7B9783fd10-b6e4-46fd-9e86-91dc730f4392%7D/" - } - }, - "type": "user", - "uuid": "{9783fd10-b6e4-46fd-9e86-91dc730f4392}", - "account_id": "5f74aba0c594410077143b10", - "nickname": "Marcel van der Laan" - }, - "role": "REVIEWER", - "approved": false, - "state": null, - "participated_on": null - }, - { - "type": "participant", - "user": { - "display_name": "Björn [REDACTED]", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B99927a7f-57e1-457d-92f4-4be1a4af9137%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/BS-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B99927a7f-57e1-457d-92f4-4be1a4af9137%7D/" - } - }, - "type": "user", - "uuid": "{99927a7f-57e1-457d-92f4-4be1a4af9137}", - "account_id": "712020:d6d2db88-8e9d-4e8d-a275-93829ee8c7eb", - "nickname": "Björn [REDACTED]" - }, - "role": "PARTICIPANT", - "approved": true, - "state": "approved", - "participated_on": "2024-07-10T09:21:05.672066+00:00" - } - ], - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/pullrequests/419" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/pull-requests/419" - }, - "commits": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/pullrequests/419/commits" - }, - "approve": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/pullrequests/419/approve" - }, - "request-changes": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/pullrequests/419/request-changes" - }, - "diff": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/diff/groupname/xo:640b42e1b503%0Da1176fc2a583?from_pullrequest_id=419&topic=true&exclude_files=97a77efb-65a7-42d5-b48a-5c13c78fdadf" - }, - "diffstat": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/diffstat/groupname/xo:640b42e1b503%0Da1176fc2a583?from_pullrequest_id=419&topic=true&exclude_files=97a77efb-65a7-42d5-b48a-5c13c78fdadf" - }, - "comments": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/pullrequests/419/comments" - }, - "activity": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/pullrequests/419/activity" - }, - "merge": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/pullrequests/419/merge" - }, - "decline": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/pullrequests/419/decline" - }, - "statuses": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/pullrequests/419/statuses" - } - }, - "summary": { - "type": "rendered", - "raw": "## What\n\nAdd response to the 319 with all of it’s validation.\n\n## How to test\n\n1. Go to the 319\n2. There should be a new block Response\n3. All validation should work\n4. Should show an extra dropdown when choosing “Verzoek afgewezen“\n\n‌", - "markup": "markdown", - "html": "

What

\n

Add response to the 319 with all of it’s validation.

\n

How to test

\n
    \n
  1. Go to the 319
  2. \n
  3. There should be a new block Response
  4. \n
  5. All validation should work
  6. \n
  7. Should show an extra dropdown when choosing “Verzoek afgewezen“
  8. \n
\n

" - } - } - } -} diff --git a/cypress/fixtures/bitbucket/temporary/repo_push--bjorn-change.json b/cypress/fixtures/bitbucket/temporary/repo_push--bjorn-change.json deleted file mode 100644 index d723523..0000000 --- a/cypress/fixtures/bitbucket/temporary/repo_push--bjorn-change.json +++ /dev/null @@ -1,635 +0,0 @@ -{ - "headers": { - "user-agent": "Bitbucket-Webhooks/2.0", - "content-type": "application/json", - "x-event-key": "repo:push" - }, - "body": { - "push": { - "changes": [ - { - "old": { - "name": "feature/XO-465", - "target": { - "type": "commit", - "hash": "240c78ed4c4968bf9637a1ca021378ba08c0f300", - "date": "2024-07-03T14:49:08+00:00", - "author": { - "type": "author", - "raw": "Nick [REDACTED] <[REDACTED]>", - "user": { - "display_name": "Nick", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B439374be-ee4d-411c-b153-0b768303ac74%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/N-5.png" - }, - "html": { - "href": "https://bitbucket.org/%7B439374be-ee4d-411c-b153-0b768303ac74%7D/" - } - }, - "type": "user", - "uuid": "{439374be-ee4d-411c-b153-0b768303ac74}", - "account_id": "712020:343fef7f-3815-42cb-bd8f-f22fd8d6676d", - "nickname": "Nick" - } - }, - "message": "Updates based on formcontext\n", - "summary": { - "type": "rendered", - "raw": "Updates based on formcontext\n", - "markup": "markdown", - "html": "

Updates based on formcontext

" - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/240c78ed4c4968bf9637a1ca021378ba08c0f300" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/240c78ed4c4968bf9637a1ca021378ba08c0f300" - } - }, - "parents": [ - { - "hash": "b6c90e8e88e6cfaa779e6f2f487b39515a8e34ad", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/b6c90e8e88e6cfaa779e6f2f487b39515a8e34ad" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/b6c90e8e88e6cfaa779e6f2f487b39515a8e34ad" - } - }, - "type": "commit" - } - ], - "rendered": {}, - "properties": {} - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/refs/branches/feature/XO-465" - }, - "commits": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commits/feature/XO-465" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/branch/feature/XO-465" - } - }, - "type": "branch", - "merge_strategies": ["merge_commit", "squash", "fast_forward"], - "default_merge_strategy": "merge_commit" - }, - "new": { - "name": "feature/XO-465", - "target": { - "type": "commit", - "hash": "640b42e1b50357df0b1d0703d5b974b002922b25", - "date": "2024-07-10T09:21:23+00:00", - "author": { - "type": "author", - "raw": "Nick [REDACTED] <[REDACTED]>", - "user": { - "display_name": "Nick", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B439374be-ee4d-411c-b153-0b768303ac74%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/N-5.png" - }, - "html": { - "href": "https://bitbucket.org/%7B439374be-ee4d-411c-b153-0b768303ac74%7D/" - } - }, - "type": "user", - "uuid": "{439374be-ee4d-411c-b153-0b768303ac74}", - "account_id": "712020:343fef7f-3815-42cb-bd8f-f22fd8d6676d", - "nickname": "Nick" - } - }, - "message": "Updates based on formcontext\n", - "summary": { - "type": "rendered", - "raw": "Updates based on formcontext\n", - "markup": "markdown", - "html": "

Updates based on formcontext

" - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/640b42e1b50357df0b1d0703d5b974b002922b25" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/640b42e1b50357df0b1d0703d5b974b002922b25" - } - }, - "parents": [ - { - "hash": "7ac8ace30ac86c78516d5d88ba086088fd3d8379", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/7ac8ace30ac86c78516d5d88ba086088fd3d8379" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/7ac8ace30ac86c78516d5d88ba086088fd3d8379" - } - }, - "type": "commit" - } - ], - "rendered": {}, - "properties": {} - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/refs/branches/feature/XO-465" - }, - "commits": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commits/feature/XO-465" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/branch/feature/XO-465" - } - }, - "type": "branch", - "merge_strategies": ["merge_commit", "squash", "fast_forward"], - "default_merge_strategy": "merge_commit" - }, - "truncated": true, - "created": false, - "forced": true, - "closed": false, - "links": { - "commits": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commits?include=640b42e1b50357df0b1d0703d5b974b002922b25&exclude=240c78ed4c4968bf9637a1ca021378ba08c0f300" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/branch/feature/XO-465" - } - }, - "commits": [ - { - "type": "commit", - "hash": "640b42e1b50357df0b1d0703d5b974b002922b25", - "date": "2024-07-10T09:21:23+00:00", - "author": { - "type": "author", - "raw": "Nick [REDACTED] <[REDACTED]>", - "user": { - "display_name": "Nick", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B439374be-ee4d-411c-b153-0b768303ac74%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/N-5.png" - }, - "html": { - "href": "https://bitbucket.org/%7B439374be-ee4d-411c-b153-0b768303ac74%7D/" - } - }, - "type": "user", - "uuid": "{439374be-ee4d-411c-b153-0b768303ac74}", - "account_id": "712020:343fef7f-3815-42cb-bd8f-f22fd8d6676d", - "nickname": "Nick" - } - }, - "message": "Updates based on formcontext\n", - "summary": { - "type": "rendered", - "raw": "Updates based on formcontext\n", - "markup": "markdown", - "html": "

Updates based on formcontext

" - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/640b42e1b50357df0b1d0703d5b974b002922b25" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/640b42e1b50357df0b1d0703d5b974b002922b25" - }, - "diff": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/diff/640b42e1b50357df0b1d0703d5b974b002922b25" - }, - "approve": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/640b42e1b50357df0b1d0703d5b974b002922b25/approve" - }, - "comments": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/640b42e1b50357df0b1d0703d5b974b002922b25/comments" - }, - "statuses": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/640b42e1b50357df0b1d0703d5b974b002922b25/statuses" - }, - "patch": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/patch/640b42e1b50357df0b1d0703d5b974b002922b25" - } - }, - "parents": [ - { - "hash": "7ac8ace30ac86c78516d5d88ba086088fd3d8379", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/7ac8ace30ac86c78516d5d88ba086088fd3d8379" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/7ac8ace30ac86c78516d5d88ba086088fd3d8379" - } - }, - "type": "commit" - } - ], - "rendered": {}, - "properties": {} - }, - { - "type": "commit", - "hash": "7ac8ace30ac86c78516d5d88ba086088fd3d8379", - "date": "2024-07-10T09:21:23+00:00", - "author": { - "type": "author", - "raw": "Nick [REDACTED] <[REDACTED]>", - "user": { - "display_name": "Nick", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B439374be-ee4d-411c-b153-0b768303ac74%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/N-5.png" - }, - "html": { - "href": "https://bitbucket.org/%7B439374be-ee4d-411c-b153-0b768303ac74%7D/" - } - }, - "type": "user", - "uuid": "{439374be-ee4d-411c-b153-0b768303ac74}", - "account_id": "712020:343fef7f-3815-42cb-bd8f-f22fd8d6676d", - "nickname": "Nick" - } - }, - "message": "Remove unnecessary use client\n", - "summary": { - "type": "rendered", - "raw": "Remove unnecessary use client\n", - "markup": "markdown", - "html": "

Remove unnecessary use client

" - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/7ac8ace30ac86c78516d5d88ba086088fd3d8379" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/7ac8ace30ac86c78516d5d88ba086088fd3d8379" - }, - "diff": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/diff/7ac8ace30ac86c78516d5d88ba086088fd3d8379" - }, - "approve": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/7ac8ace30ac86c78516d5d88ba086088fd3d8379/approve" - }, - "comments": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/7ac8ace30ac86c78516d5d88ba086088fd3d8379/comments" - }, - "statuses": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/7ac8ace30ac86c78516d5d88ba086088fd3d8379/statuses" - }, - "patch": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/patch/7ac8ace30ac86c78516d5d88ba086088fd3d8379" - } - }, - "parents": [ - { - "hash": "a1aa9672cbb46523b20b20f86236b7a6940ee658", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/a1aa9672cbb46523b20b20f86236b7a6940ee658" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/a1aa9672cbb46523b20b20f86236b7a6940ee658" - } - }, - "type": "commit" - } - ], - "rendered": {}, - "properties": {} - }, - { - "type": "commit", - "hash": "a1aa9672cbb46523b20b20f86236b7a6940ee658", - "date": "2024-07-10T09:21:23+00:00", - "author": { - "type": "author", - "raw": "Björn [REDACTED] <[REDACTED]>", - "user": { - "display_name": "Björn [REDACTED]", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7Bbe9dd250-ad35-4008-acfe-40b82b2bbcdc%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/BS-6.png" - }, - "html": { - "href": "https://bitbucket.org/%7Bbe9dd250-ad35-4008-acfe-40b82b2bbcdc%7D/" - } - }, - "type": "user", - "uuid": "{be9dd250-ad35-4008-acfe-40b82b2bbcdc}", - "account_id": "640f2c085534b0bf743f6396", - "nickname": "Björn [REDACTED]" - } - }, - "message": "XO-465 fix hydration errors, add wmo as string to the tests, add @xo to the select import\n", - "summary": { - "type": "rendered", - "raw": "XO-465 fix hydration errors, add wmo as string to the tests, add @xo to the select import\n", - "markup": "markdown", - "html": "

XO-465 fix hydration errors, add wmo as string to the tests, add @xo to the select import

" - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/a1aa9672cbb46523b20b20f86236b7a6940ee658" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/a1aa9672cbb46523b20b20f86236b7a6940ee658" - }, - "diff": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/diff/a1aa9672cbb46523b20b20f86236b7a6940ee658" - }, - "approve": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/a1aa9672cbb46523b20b20f86236b7a6940ee658/approve" - }, - "comments": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/a1aa9672cbb46523b20b20f86236b7a6940ee658/comments" - }, - "statuses": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/a1aa9672cbb46523b20b20f86236b7a6940ee658/statuses" - }, - "patch": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/patch/a1aa9672cbb46523b20b20f86236b7a6940ee658" - } - }, - "parents": [ - { - "hash": "71898eee3b785dac2f0aca4d7cc11a3592165804", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/71898eee3b785dac2f0aca4d7cc11a3592165804" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/71898eee3b785dac2f0aca4d7cc11a3592165804" - } - }, - "type": "commit" - } - ], - "rendered": {}, - "properties": {} - }, - { - "type": "commit", - "hash": "71898eee3b785dac2f0aca4d7cc11a3592165804", - "date": "2024-07-10T09:21:23+00:00", - "author": { - "type": "author", - "raw": "Nick [REDACTED] <[REDACTED]>", - "user": { - "display_name": "Nick", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B439374be-ee4d-411c-b153-0b768303ac74%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/N-5.png" - }, - "html": { - "href": "https://bitbucket.org/%7B439374be-ee4d-411c-b153-0b768303ac74%7D/" - } - }, - "type": "user", - "uuid": "{439374be-ee4d-411c-b153-0b768303ac74}", - "account_id": "712020:343fef7f-3815-42cb-bd8f-f22fd8d6676d", - "nickname": "Nick" - } - }, - "message": "Fix code coverage exclusion\n", - "summary": { - "type": "rendered", - "raw": "Fix code coverage exclusion\n", - "markup": "markdown", - "html": "

Fix code coverage exclusion

" - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/71898eee3b785dac2f0aca4d7cc11a3592165804" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/71898eee3b785dac2f0aca4d7cc11a3592165804" - }, - "diff": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/diff/71898eee3b785dac2f0aca4d7cc11a3592165804" - }, - "approve": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/71898eee3b785dac2f0aca4d7cc11a3592165804/approve" - }, - "comments": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/71898eee3b785dac2f0aca4d7cc11a3592165804/comments" - }, - "statuses": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/71898eee3b785dac2f0aca4d7cc11a3592165804/statuses" - }, - "patch": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/patch/71898eee3b785dac2f0aca4d7cc11a3592165804" - } - }, - "parents": [ - { - "hash": "44950e9a2e302e3716b3e6470fd713238b26a1ce", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/44950e9a2e302e3716b3e6470fd713238b26a1ce" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/44950e9a2e302e3716b3e6470fd713238b26a1ce" - } - }, - "type": "commit" - } - ], - "rendered": {}, - "properties": {} - }, - { - "type": "commit", - "hash": "44950e9a2e302e3716b3e6470fd713238b26a1ce", - "date": "2024-07-10T09:21:23+00:00", - "author": { - "type": "author", - "raw": "Nick [REDACTED] <[REDACTED]>", - "user": { - "display_name": "Nick", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B439374be-ee4d-411c-b153-0b768303ac74%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/N-5.png" - }, - "html": { - "href": "https://bitbucket.org/%7B439374be-ee4d-411c-b153-0b768303ac74%7D/" - } - }, - "type": "user", - "uuid": "{439374be-ee4d-411c-b153-0b768303ac74}", - "account_id": "712020:343fef7f-3815-42cb-bd8f-f22fd8d6676d", - "nickname": "Nick" - } - }, - "message": "Fix typo in type ReasonForEndings response\n", - "summary": { - "type": "rendered", - "raw": "Fix typo in type ReasonForEndings response\n", - "markup": "markdown", - "html": "

Fix typo in type ReasonForEndings response

" - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/44950e9a2e302e3716b3e6470fd713238b26a1ce" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/44950e9a2e302e3716b3e6470fd713238b26a1ce" - }, - "diff": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/diff/44950e9a2e302e3716b3e6470fd713238b26a1ce" - }, - "approve": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/44950e9a2e302e3716b3e6470fd713238b26a1ce/approve" - }, - "comments": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/44950e9a2e302e3716b3e6470fd713238b26a1ce/comments" - }, - "statuses": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/44950e9a2e302e3716b3e6470fd713238b26a1ce/statuses" - }, - "patch": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/patch/44950e9a2e302e3716b3e6470fd713238b26a1ce" - } - }, - "parents": [ - { - "hash": "757a981147fbf91035f161939677dccfc900b566", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo/commit/757a981147fbf91035f161939677dccfc900b566" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo/commits/757a981147fbf91035f161939677dccfc900b566" - } - }, - "type": "commit" - } - ], - "rendered": {}, - "properties": {} - } - ] - } - ] - }, - "repository": { - "type": "repository", - "full_name": "groupname/xo", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/groupname/xo" - }, - "html": { - "href": "https://bitbucket.org/groupname/xo" - }, - "avatar": { - "href": "https://bytebucket.org/ravatar/%7B05740f13-ee26-40c5-b530-4d204854fea1%7D?ts=3379276" - } - }, - "name": "XO", - "scm": "git", - "website": null, - "owner": { - "display_name": "Development groupname", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/DL-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B0cd27561-674a-4f88-a54b-593966be7ac9%7D/" - } - }, - "type": "user", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "account_id": "5a6a0877bae36d1ee1890185", - "nickname": "Development groupname" - }, - "workspace": { - "type": "workspace", - "uuid": "{0cd27561-674a-4f88-a54b-593966be7ac9}", - "name": "Development groupname", - "slug": "groupname", - "links": { - "avatar": { - "href": "https://bitbucket.org/workspaces/groupname/avatar/?ts=1677682798" - }, - "html": { - "href": "https://bitbucket.org/groupname/" - }, - "self": { - "href": "https://api.bitbucket.org/2.0/workspaces/groupname" - } - } - }, - "is_private": true, - "project": { - "type": "project", - "key": "PROJ", - "uuid": "{e3a2a754-7d0a-4616-a892-8acd318d7ab1}", - "name": "Software", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/workspaces/groupname/projects/PROJ" - }, - "html": { - "href": "https://bitbucket.org/groupname/workspace/projects/PROJ" - }, - "avatar": { - "href": "https://bitbucket.org/account/user/groupname/projects/PROJ/avatar/32?ts=1593421915" - } - } - }, - "uuid": "{05740f13-ee26-40c5-b530-4d204854fea1}", - "parent": null - }, - "actor": { - "display_name": "Björn [REDACTED]", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/users/%7B99927a7f-57e1-457d-92f4-4be1a4af9137%7D" - }, - "avatar": { - "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/BS-3.png" - }, - "html": { - "href": "https://bitbucket.org/%7B99927a7f-57e1-457d-92f4-4be1a4af9137%7D/" - } - }, - "type": "user", - "uuid": "{99927a7f-57e1-457d-92f4-4be1a4af9137}", - "account_id": "712020:d6d2db88-8e9d-4e8d-a275-93829ee8c7eb", - "nickname": "Björn [REDACTED]" - } - } -} diff --git a/types/bitbucket.ts b/types/bitbucket.ts index a495e0c..cef987e 100644 --- a/types/bitbucket.ts +++ b/types/bitbucket.ts @@ -28,20 +28,6 @@ export type BitBucketUser = { export type BitBucketBuildState = 'INPROGRESS' | 'FAILED' | 'SUCCESSFUL'; -export type BitBucketCommitStatus = { - key: string; - type: 'build' | unknown; - state: BitBucketBuildState; - name: string; - refname: string | null; // branch name - commit: { - message: string; - author: { - user: BitBucketUser; - }; - }; -}; - export type BitBucketChange = { name: string; // branch/tag name type: 'branch' | 'tag' | unknown; @@ -67,7 +53,37 @@ export type BitBucketPushWebhook = { }; export type BitBucketCommitStatusWebhook = { - commit_status: BitBucketCommitStatus; + commit_status: { + key: string; + type: 'build' | unknown; + state: BitBucketBuildState; + name: string; + refname: string | null; // branch name + commit: { + message: string; + author: { + user: BitBucketUser; + }; + }; + }; + repository: BitBucketRepository; + actor: BitBucketUser; +}; + +export type BitBucketPullRequestWebhook = { + pullrequest: { + title: string; + source: { + branch: { + name: string; + }; + }; + links: { + html: { + href: string; + }; + }; + }; repository: BitBucketRepository; actor: BitBucketUser; };