File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @pipedream/github" ,
3- "version" : " 1.4.0 " ,
3+ "version" : " 1.4.1 " ,
44 "description" : " Pipedream Github Components" ,
55 "main" : " github.app.mjs" ,
66 "keywords" : [
Original file line number Diff line number Diff line change @@ -349,6 +349,11 @@ export default {
349349 value : "opened" ,
350350 } ,
351351 ] ,
352+ PULL_REQUEST_REVIEW_STATES : [
353+ "approved" ,
354+ "changes_requested" ,
355+ "commented" ,
356+ ] ,
352357} ;
353358
354359export const SAMPLE_GITHUB_HEADERS = {
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ export default {
88 name : "New Webhook Event (Instant)" ,
99 description : "Emit new event for each selected event type" ,
1010 type : "source" ,
11- version : "1.0.5" ,
11+ version : "1.0.6" ,
12+ dedupe : "unique" ,
1213 props : {
1314 docsInfo : {
1415 type : "alert" ,
@@ -21,9 +22,23 @@ export default {
2122 description : "The event types to be emitted" ,
2223 type : "string[]" ,
2324 options : constants . REPOSITORY_WEBHOOK_EVENTS ,
25+ reloadProps : true ,
2426 } ,
2527 } ,
26- dedupe : "unique" ,
28+ async additionalProps ( ) {
29+ await this . requireAdminPermission ( ) ;
30+ const props = { } ;
31+ if ( this . events ?. length && this . events . includes ( "pull_request_review" ) ) {
32+ props . reviewState = {
33+ type : "string" ,
34+ label : "Review State" ,
35+ description : "Filter `pull_request_review` events by review state" ,
36+ options : constants . PULL_REQUEST_REVIEW_STATES ,
37+ optional : true ,
38+ } ;
39+ }
40+ return props ;
41+ } ,
2742 methods : {
2843 ...common . methods ,
2944 getWebhookEvents ( ) {
@@ -42,6 +57,10 @@ export default {
4257 return ;
4358 }
4459
60+ if ( headers [ "x-github-event" ] === "pull_request_review" && this . reviewState && body . review . state !== this . reviewState ) {
61+ return ;
62+ }
63+
4564 this . $emit ( {
4665 ...getRelevantHeaders ( headers ) ,
4766 ...body ,
You can’t perform that action at this time.
0 commit comments