Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
FireLemons committed Apr 10, 2022
1 parent c6d14a1 commit d71456b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ async function archiveCard(cardId) {
// @throws {RangeError} if limit is negative or not an integer
// @fulfilled The number of cards successfully archived
function archiveCards(cards, limit) {
console.log("cards");
console.log(cards);
const cardsToBeArchived = cards.slice(limit);
console.log("cardsToBeArchived");
console.log(cardsToBeArchived);
const delayBetweenRequestsMS = cards.length >= MAX_CARDS_PER_PAGE ? 1000 : 0;
if (delayBetweenRequestsMS) {
console.log('INFO: A large number of archive project card requests will be sent. Throttling requests.');
Expand Down
5 changes: 5 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ async function archiveCard (cardId: number): Promise<OctokitResponse<any, any>>
// @throws {RangeError} if limit is negative or not an integer
// @fulfilled The number of cards successfully archived
function archiveCards (cards: Array<Card>, limit: number): Promise<number> {
console.log("cards")
console.log(cards)

const cardsToBeArchived = cards.slice(limit)
console.log("cardsToBeArchived")
console.log(cardsToBeArchived)
const delayBetweenRequestsMS = cards.length >= MAX_CARDS_PER_PAGE ? 1000 : 0

if (delayBetweenRequestsMS) {
Expand Down

0 comments on commit d71456b

Please sign in to comment.