@@ -8,7 +8,7 @@ import multipleReviewersWithMultipleReviews
8
8
import { GitHubInstallationClient } from "~/src/github/client/github-installation-client" ;
9
9
import { getInstallationId } from "~/src/github/client/installation-id" ;
10
10
import { getLogger } from "config/logger" ;
11
- import { booleanFlag , BooleanFlags , shouldSendAll } from "config/feature-flags" ;
11
+ import { shouldSendAll } from "config/feature-flags" ;
12
12
import _ , { cloneDeep } from "lodash" ;
13
13
import { createLogger } from "bunyan" ;
14
14
import { when } from "jest-when" ;
@@ -21,10 +21,6 @@ describe("pull_request transform REST", () => {
21
21
beforeEach ( ( ) => {
22
22
mockSystemTime ( 12345678 ) ;
23
23
client = new GitHubInstallationClient ( getInstallationId ( gitHubInstallationId ) , gitHubCloudConfig , jiraHost , { trigger : "test" } , getLogger ( "test" ) ) ;
24
-
25
- when ( booleanFlag ) . calledWith (
26
- BooleanFlags . INNO_DRAFT_PR
27
- ) . mockResolvedValue ( true ) ;
28
24
} ) ;
29
25
30
26
it ( "should not contain branches on the payload if pull request status is closed." , async ( ) => {
@@ -746,9 +742,7 @@ describe("pull_request transform GraphQL", () => {
746
742
747
743
const { updatedAt } = payload ;
748
744
749
- const isDraftPrFFOn = true ;
750
-
751
- const data = transformPullRequest ( REPO_OBJ , jiraHost , payload as any , true , logger , isDraftPrFFOn ) ;
745
+ const data = transformPullRequest ( REPO_OBJ , jiraHost , payload as any , true , logger ) ;
752
746
753
747
expect ( data ) . toMatchObject ( {
754
748
author : {
@@ -788,9 +782,7 @@ describe("pull_request transform GraphQL", () => {
788
782
789
783
const { updatedAt } = payload ;
790
784
791
- const isDraftPrFFOn = true ;
792
-
793
- const data = transformPullRequest ( REPO_OBJ , jiraHost , payload as any , true , logger , isDraftPrFFOn ) ;
785
+ const data = transformPullRequest ( REPO_OBJ , jiraHost , payload as any , true , logger ) ;
794
786
795
787
expect ( data ) . toStrictEqual ( {
796
788
author : {
@@ -832,9 +824,7 @@ describe("pull_request transform GraphQL", () => {
832
824
833
825
const { updatedAt } = payload ;
834
826
835
- const isDraftPrFFOn = true ;
836
-
837
- const data = await transformPullRequest ( REPO_OBJ , jiraHost , payload as any , true , logger , isDraftPrFFOn ) ;
827
+ const data = await transformPullRequest ( REPO_OBJ , jiraHost , payload as any , true , logger ) ;
838
828
839
829
expect ( data ) . toStrictEqual ( {
840
830
author : {
@@ -874,9 +864,7 @@ describe("pull_request transform GraphQL", () => {
874
864
const payload = { ...createPullPayload ( title ) , author : { } } ;
875
865
payload . reviews = createReview ( "APPROVED" , "cool-email@emails.com" ) ;
876
866
877
- const isDraftPrFFOn = true ;
878
-
879
- const data = await transformPullRequest ( REPO_OBJ , jiraHost , payload as any , true , logger , isDraftPrFFOn ) ;
867
+ const data = await transformPullRequest ( REPO_OBJ , jiraHost , payload as any , true , logger ) ;
880
868
const { updatedAt } = payload ;
881
869
882
870
expect ( data ) . toMatchObject ( {
@@ -915,9 +903,7 @@ describe("pull_request transform GraphQL", () => {
915
903
const payload = { ...createPullPayload ( title ) , author : { } } ;
916
904
payload . reviews = createMultipleReviews ( ) ;
917
905
918
- const isDraftPrFFOn = true ;
919
-
920
- const data = await transformPullRequest ( REPO_OBJ , jiraHost , payload as any , true , logger , isDraftPrFFOn ) ;
906
+ const data = await transformPullRequest ( REPO_OBJ , jiraHost , payload as any , true , logger ) ;
921
907
922
908
expect ( { firstReviewStatus : data ?. reviewers [ 0 ] } ) . toEqual ( expect . objectContaining ( {
923
909
firstReviewStatus : expect . objectContaining ( {
0 commit comments