Skip to content

Commit 5cad2f9

Browse files
committed
add approve button
1 parent 2f7c522 commit 5cad2f9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

github/enum/Modals.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export enum ModalsEnum {
3535
MERGE_PULL_REQUEST_ACTION = 'merge-pull-request',
3636
MERGE_PULL_REQUEST_LABEL = 'Merge',
3737
APPROVE_PULL_REQUEST_ACTION = 'approve-pull-request',
38+
APPROVE_PULL_REQUEST_LABEL = 'Approve',
3839
COMMENT_PR_ACTION = 'comment-pull-request',
3940
COMMENT_PR_LABEL = 'Add Comment',
4041
COMMENT_ISSUE_ACTION = 'comment-issue',

github/modals/pullDetailsModal.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ export async function pullDetailsModal({
140140
},
141141
value: `${data?.repository} ${data?.number}`,
142142
}),
143+
block.newButtonElement({
144+
actionId: ModalsEnum.APPROVE_PULL_REQUEST_ACTION,
145+
text: {
146+
text: ModalsEnum.APPROVE_PULL_REQUEST_LABEL,
147+
type: TextObjectType.PLAINTEXT,
148+
},
149+
value: `${data?.repository} ${data?.number}`,
150+
}),
143151
],
144152
});
145153

0 commit comments

Comments
 (0)