Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit ac057ad

Browse files
committed
remove debugging output
1 parent 3a709af commit ac057ad

2 files changed

Lines changed: 0 additions & 38 deletions

File tree

dist/index.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,8 +2187,6 @@ const github = graphql_1.graphql.defaults({
21872187
});
21882188
function 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++) {

src/main.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ const github = graphql.defaults({
1414
})
1515

1616
async function getAutomationNote(column: any): Promise<string> {
17-
core.info(`source column: ${column.name}`)
18-
core.info(`source project: ${column.project.name}`)
1917
return AUTOMATION_NOTE_TEMPLATE.replace('<column name>', column.name)
2018
.replace('<column url>', column.url.replace('/columns/', '#column-'))
2119
.replace('<project name>', column.project.name)
@@ -56,10 +54,8 @@ async function ensureCard(
5654
const cardData: any = {}
5755
if (card.content) {
5856
cardData.contentId = card.content.id
59-
core.info(`setting content: ${card.content.id}`)
6057
} else {
6158
cardData.note = card.note
62-
core.info(`setting note: ${cardData.note}`)
6359
}
6460

6561
const response = await github(queries.ADD_PROJECT_CARD, {
@@ -76,14 +72,8 @@ async function ensureCard(
7672
targetColumn.cards.nodes.unshift(targetCard)
7773
targetCardIndex = 0
7874
core.info(`created card: ${targetCard.id}`)
79-
core.info('cards now has:')
80-
core.info(JSON.stringify(targetColumn.cards.nodes))
81-
core.info(`new target card index = ${targetCardIndex}`)
82-
} else {
83-
core.info(`found card: ${targetCard.id}`)
8475
}
8576

86-
core.info(`card at index ${targetCardIndex}, wanted at ${index}`)
8777
if (targetCardIndex !== index) {
8878
// move!
8979
core.info(`moving card: ${targetCard.id}`)
@@ -104,7 +94,6 @@ async function ensureCard(
10494
targetCardIndex = index
10595

10696
core.info(`moved card: ${targetCard.id} after ${moveData.afterCardId}`)
107-
core.info(JSON.stringify(targetColumn.cards.nodes))
10897
}
10998

11099
return targetCard
@@ -127,20 +116,13 @@ async function run(): Promise<void> {
127116
const sourceColumn = response['sourceColumn']
128117
const targetColumn = response['targetColumn']
129118

130-
core.info('sourceColumn')
131-
core.info(JSON.stringify(sourceColumn))
132-
core.info('targetColumn')
133-
core.info(JSON.stringify(targetColumn))
134-
135-
core.info(`ensuring automation note card`)
136119
// make sure that a card explaining the automation on the column exists
137120
// at index 0 in the target column
138121
const automationNoteCard: any = {
139122
note: await getAutomationNote(sourceColumn)
140123
}
141124
await ensureCard(automationNoteCard, 0, targetColumn)
142125

143-
core.info(`deleting extra cards from target column`)
144126
// delete all cards in target column that do not exist in the source column,
145127
// except for the automation note
146128
// start at index 1 to account for the automation note card
@@ -154,7 +136,6 @@ async function run(): Promise<void> {
154136
}
155137
}
156138

157-
core.info(`syncing cards from source column`)
158139
// make sure cards from the source column are in target column, in the right
159140
// order
160141
for (let index = 0; index < sourceColumn.cards.nodes.length; index++) {

0 commit comments

Comments
 (0)