Skip to content

Fix time formatting (closes #34) #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# https://gist.github.com/sindresorhus/7996717
1 change: 0 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

npm run validate
4 changes: 2 additions & 2 deletions app/helpers/modLog.ts
Original file line number Diff line number Diff line change
@@ -205,7 +205,7 @@ const constructLog = async ({
lastReport.message.author.username
}) warned ${previousWarnings.size + 1} times recently, posted in ${
logs.length
} channels ${formatDistanceToNowStrict(lastReport.message.createdAt)} ago`;
} channels ${formatDistanceToNowStrict(lastReport.message.createdAt)} before this log (<t:${Math.floor(lastReport.message.createdTimestamp / 1000)}:R>)`;
const extra = origExtra ? `${origExtra}\n` : "";

// If it has the data for a poll, use a specialized formatting function
@@ -217,7 +217,7 @@ const constructLog = async ({
warnings.push(
`[${format(logMessage.createdAt, "PP kk:mmX")}](${constructDiscordLink(
logMessage,
)}) (<t:${logMessage.createdAt}:R>)`,
)}) (<t:${Math.floor(logMessage.createdAt.getTime() / 1000)}:R>)`,
);
}


Unchanged files with check annotations Beta

FROM node:20-alpine as build

Check warning on line 1 in Dockerfile

GitHub Actions / build

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
WORKDIR /app
COPY package.json package-lock.json ./