Skip to content

Commit ab5d56c

Browse files
authored
Added columns destination, source and destination_branch_name to the bitbucket_pull_request table closes #116 (#119)
1 parent 1ecdbd3 commit ab5d56c

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

bitbucket/table_bitbucket_pull_request.go

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ func tableBitbucketPullRequest(_ context.Context) *plugin.Table {
4848
Description: "A current state of the pull request. Can be one of \"MERGED\", \"SUPERSEDED\", \"OPEN\" and \"DECLINED\".",
4949
Type: proto.ColumnType_STRING,
5050
},
51+
{
52+
Name: "destination",
53+
Description: "Details of the target branch where the pull request is intended to be merged, including branch name, latest commit metadata, and destination repository information.",
54+
Type: proto.ColumnType_JSON,
55+
},
56+
{
57+
Name: "source",
58+
Description: "Details of the source branch where the pull request originates from, including branch name, latest commit metadata, and source repository information.",
59+
Type: proto.ColumnType_JSON,
60+
},
5161

5262
// other fields
5363
{
@@ -63,11 +73,17 @@ func tableBitbucketPullRequest(_ context.Context) *plugin.Table {
6373
Transform: transform.FromField("Author.uuid"),
6474
},
6575
{
66-
Name: "branch_name",
76+
Name: "source_branch_name",
6777
Description: "Name of the source branch for the pull request.",
6878
Type: proto.ColumnType_STRING,
6979
Transform: transform.FromField("Source.branch.name"),
7080
},
81+
{
82+
Name: "destination_branch_name",
83+
Description: "Name of the destination branch for the pull request.",
84+
Type: proto.ColumnType_STRING,
85+
Transform: transform.FromField("Destination.branch.name"),
86+
},
7187
{
7288
Name: "comment_count",
7389
Description: "The number of comments for a specific pull request.",

docs/tables/bitbucket_pull_request.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ select
2525
id,
2626
title,
2727
state,
28-
branch_name,
28+
source_branch_name,
2929
author_display_name
3030
from
3131
bitbucket_pull_request
@@ -40,7 +40,7 @@ select
4040
id,
4141
title,
4242
state,
43-
branch_name,
43+
source_branch_name,
4444
author_display_name
4545
from
4646
bitbucket_pull_request

0 commit comments

Comments
 (0)