-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Separate github and gitlab scripts (#526)
* feat: Add updateGitlab.js * feat: Add updateGithub.js * Remove stars action * Remove @actions/core * Add injectors * Fix matching repo URLs * Format * Simplify injectData * Add shared chunk.js file
- Loading branch information
1 parent
2054e0b
commit ea37aa2
Showing
16 changed files
with
709 additions
and
786 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Divide an array into multiple smaller array | ||
* @param {Array} input | ||
* @param {number} size | ||
* @return {Array<Array>} | ||
*/ | ||
export function chunk(input, size) { | ||
size = size < 1 ? 10 : size; | ||
const pages = Math.ceil(input.length / size); | ||
const final = []; | ||
for (let index = 0; index < pages; index++) { | ||
final.push(input.slice(index * size, (index + 1) * size)); | ||
} | ||
return final; | ||
} |
Oops, something went wrong.