From a98664832fafb082bf2f7d3a74544fa14d26a800 Mon Sep 17 00:00:00 2001 From: Rob Prentiss Date: Tue, 7 Jan 2025 13:31:09 -0800 Subject: [PATCH] Add `draft` attribute to bitbucket-server `PullRequest` As of Bitbucket Data Center 8.17, pull requests can be in a "Draft" state, similar to other providers like Github/Gitea. This change updates the `PullRequest` struct for the bitbucket-server package to include this new attribute, so it can be used in handling webhook payloads. --- bitbucket-server/payload.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bitbucket-server/payload.go b/bitbucket-server/payload.go index 20f7e8d..cc72642 100644 --- a/bitbucket-server/payload.go +++ b/bitbucket-server/payload.go @@ -214,6 +214,7 @@ type PullRequest struct { State string `json:"state"` Open bool `json:"open"` Closed bool `json:"closed"` + Draft bool `json:"draft"` CreatedDate uint64 `json:"createdDate"` UpdatedDate uint64 `json:"updatedDate,omitempty"` ClosedDate uint64 `json:"closedDate,omitempty"`