Skip to content

Commit

Permalink
ci(update-flake-inputs): better timestamps in automated commit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
luisnquin committed Oct 27, 2024
1 parent 2034075 commit 2376fbf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Binary file modified .github/scripts/update-flake-inputs/bun.lockb
Binary file not shown.
9 changes: 3 additions & 6 deletions .github/scripts/update-flake-inputs/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env bun

import { formatDate } from "date-fns/format";
import { titleCase } from "title-case";
import { $ } from "bun";

import "colors";

interface FlakeMetadata {
Expand Down Expand Up @@ -106,12 +108,7 @@ const main = async () => {
}

const epochToHumanReadableDate = (epoch: number) =>
new Date(epoch * 1000).toLocaleDateString("en-US", {
hour: "2-digit",
year: "numeric",
month: "short",
day: "numeric",
});
formatDate(new Date(epoch * 1000), "yyyy-MM-dd");

const updatedInputs: Array<string> = [];
const { stderr } = process;
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/update-flake-inputs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"dependencies": {
"colors": "^1.4.0",
"date-fns": "^4.1.0",
"title-case": "^4.3.2"
}
}

0 comments on commit 2376fbf

Please sign in to comment.