-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GH star script for future run on CI (#961)
* Update GH star script for future run on CI * Add generated github file * Update file
- Loading branch information
1 parent
dcaaa96
commit 25d3381
Showing
5 changed files
with
30 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"__generated": "File generated at 2024-11-22T19:48:40.956Z", | ||
"stars": 2957 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import fs from "node:fs"; | ||
import path from "node:path"; | ||
import { getTotalStars } from "../utils/github"; | ||
|
||
const FILENAME = "./data/github.json"; | ||
const filepath = path.join(__dirname, "..", FILENAME); | ||
|
||
async function main() { | ||
const totalStars = await getTotalStars("inngest"); | ||
|
||
const fileTemplate = { | ||
__generated: `File generated at ${new Date().toISOString()}`, | ||
stars: totalStars, | ||
}; | ||
fs.writeFileSync(filepath, JSON.stringify(fileTemplate, null, 2)); | ||
console.log(`${totalStars} total stars`); | ||
} | ||
|
||
main(); |
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