@@ -2187,8 +2187,6 @@ const github = graphql_1.graphql.defaults({
21872187} ) ;
21882188function getAutomationNote ( column ) {
21892189 return __awaiter ( this , void 0 , void 0 , function * ( ) {
2190- core . info ( `source column: ${ column . name } ` ) ;
2191- core . info ( `source project: ${ column . project . name } ` ) ;
21922190 return AUTOMATION_NOTE_TEMPLATE . replace ( '<column name>' , column . name )
21932191 . replace ( '<column url>' , column . url . replace ( '/columns/' , '#column-' ) )
21942192 . replace ( '<project name>' , column . project . name )
@@ -2218,11 +2216,9 @@ function ensureCard(card, index, targetColumn) {
22182216 const cardData = { } ;
22192217 if ( card . content ) {
22202218 cardData . contentId = card . content . id ;
2221- core . info ( `setting content: ${ card . content . id } ` ) ;
22222219 }
22232220 else {
22242221 cardData . note = card . note ;
2225- core . info ( `setting note: ${ cardData . note } ` ) ;
22262222 }
22272223 const response = yield github ( queries . ADD_PROJECT_CARD , Object . assign ( { columnId : targetColumn . id } , cardData ) ) ;
22282224 if ( ! response ) {
@@ -2233,14 +2229,7 @@ function ensureCard(card, index, targetColumn) {
22332229 targetColumn . cards . nodes . unshift ( targetCard ) ;
22342230 targetCardIndex = 0 ;
22352231 core . info ( `created card: ${ targetCard . id } ` ) ;
2236- core . info ( 'cards now has:' ) ;
2237- core . info ( JSON . stringify ( targetColumn . cards . nodes ) ) ;
2238- core . info ( `new target card index = ${ targetCardIndex } ` ) ;
22392232 }
2240- else {
2241- core . info ( `found card: ${ targetCard . id } ` ) ;
2242- }
2243- core . info ( `card at index ${ targetCardIndex } , wanted at ${ index } ` ) ;
22442233 if ( targetCardIndex !== index ) {
22452234 // move!
22462235 core . info ( `moving card: ${ targetCard . id } ` ) ;
@@ -2254,7 +2243,6 @@ function ensureCard(card, index, targetColumn) {
22542243 targetColumn . cards . nodes . splice ( index , 0 , targetColumn . cards . nodes . splice ( targetCardIndex , 1 ) [ 0 ] ) ;
22552244 targetCardIndex = index ;
22562245 core . info ( `moved card: ${ targetCard . id } after ${ moveData . afterCardId } ` ) ;
2257- core . info ( JSON . stringify ( targetColumn . cards . nodes ) ) ;
22582246 }
22592247 return targetCard ;
22602248 } ) ;
@@ -2274,18 +2262,12 @@ function run() {
22742262 }
22752263 const sourceColumn = response [ 'sourceColumn' ] ;
22762264 const targetColumn = response [ 'targetColumn' ] ;
2277- core . info ( 'sourceColumn' ) ;
2278- core . info ( JSON . stringify ( sourceColumn ) ) ;
2279- core . info ( 'targetColumn' ) ;
2280- core . info ( JSON . stringify ( targetColumn ) ) ;
2281- core . info ( `ensuring automation note card` ) ;
22822265 // make sure that a card explaining the automation on the column exists
22832266 // at index 0 in the target column
22842267 const automationNoteCard = {
22852268 note : yield getAutomationNote ( sourceColumn )
22862269 } ;
22872270 yield ensureCard ( automationNoteCard , 0 , targetColumn ) ;
2288- core . info ( `deleting extra cards from target column` ) ;
22892271 // delete all cards in target column that do not exist in the source column,
22902272 // except for the automation note
22912273 // start at index 1 to account for the automation note card
@@ -2297,7 +2279,6 @@ function run() {
22972279 targetColumn . cards . nodes . splice ( index , 1 ) ;
22982280 }
22992281 }
2300- core . info ( `syncing cards from source column` ) ;
23012282 // make sure cards from the source column are in target column, in the right
23022283 // order
23032284 for ( let index = 0 ; index < sourceColumn . cards . nodes . length ; index ++ ) {
0 commit comments