Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dsoldev committed Sep 4, 2023
1 parent 7f2ab6d commit b295958
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/create_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ jobs:
script: |
const fs = require('fs');
const path = require('path');
const util = require('util');
const issueDir = './issues'; // Replace with the actual directory path
const sleep = util.promisify(setTimeout);
const files = fs.readdirSync(issueDir).filter(file => path.extname(file) === '.md').sort();
files.forEach(file => {
for (const file of files) {
const issueTitle = path.basename(file, '.md');
const issueBody = fs.readFileSync(path.join(issueDir, file), 'utf8');
const issue = {
Expand All @@ -48,5 +51,5 @@ jobs:
body: issueBody
};
await github.issues.create(issue);
await sleep(2000);
});
await sleep(2000); // Sleep for 2 seconds
}

0 comments on commit b295958

Please sign in to comment.