Skip to content

Commit

Permalink
exit debug
Browse files Browse the repository at this point in the history
  • Loading branch information
FireLemons committed Dec 16, 2021
1 parent f227b57 commit bc57357
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const projectName = core.getInput('project_name')
const {owner, repo} = github.context.repo
const octokit = github.getOctokit(token)

const MAX_CARDS_PER_PAGE = 1 // from https://docs.github.com/en/rest/reference/projects#list-project-cards
const MAX_CARDS_PER_PAGE = 100 // from https://docs.github.com/en/rest/reference/projects#list-project-cards

// Determines if an object is an object
// @param {any} variable The variable to check
Expand Down Expand Up @@ -203,8 +203,7 @@ function labelCards(cardData) {
let cardsLabeledCount = 0
let requestSentCount = 0

const requestEverySecond = setInterval(() => {
console.log(Date.now())
const requestInterval = setInterval(() => {
const card = cardData[requestSentCount]

labelCardIssue(card).then(() => {
Expand All @@ -221,7 +220,7 @@ function labelCards(cardData) {
})

if (++requestSentCount === cardData.length) {
clearInterval(requestEverySecond);
clearInterval(requestInterval);
}
}, delayBetweenRequestsMS);
})
Expand Down

0 comments on commit bc57357

Please sign in to comment.