@@ -135,10 +135,37 @@ export async function getAllNotifications(
135
135
. filter ( ( response ) => ! ! response )
136
136
. map ( async ( accountNotifications ) => {
137
137
try {
138
+ // TODO - this needs to be correctly implemented
138
139
if ( accountNotifications . account . platform === 'Bitbucket Cloud' ) {
139
- console . log (
140
- JSON . stringify ( await accountNotifications . notifications ) ,
141
- ) ;
140
+ const pulls =
141
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
142
+ ( ( await accountNotifications . notifications ) . data as any )
143
+ . pullRequests . authored ;
144
+
145
+ console . log ( JSON . stringify ( pulls , null , 2 ) ) ;
146
+
147
+ const notifications = pulls . map ( ( pull : any ) => ( {
148
+ id : 1 ,
149
+ reason : 'pull_request' ,
150
+ repository : {
151
+ full_name : pull . links . html . href ,
152
+ owner : {
153
+ avatar_url :
154
+ 'https://avatars.githubusercontent.com/u/987654321?v=4' ,
155
+ } ,
156
+ } ,
157
+ subject : {
158
+ title : pull . extra . commit_statuses [ 0 ] . key ,
159
+ url : pull . links . html . href ,
160
+ } ,
161
+ account : accountNotifications . account ,
162
+ } ) ) ;
163
+
164
+ return {
165
+ account : accountNotifications . account ,
166
+ notifications : notifications ,
167
+ error : null ,
168
+ } ;
142
169
} else {
143
170
let notifications = (
144
171
await accountNotifications . notifications
0 commit comments