chore(rules): добавить локальный hook для проверки сообщений коммитов
Docker images / prepare-release (push) Successful in 5s
Docker images / backend-image (push) Successful in 2m36s
Docker images / frontend-image (push) Successful in 2m25s
Docker images / updater-image (push) Successful in 37s
Docker images / notify-webhook (push) Has been skipped
Docker images / publish-release (push) Successful in 6s
Docker images / prepare-release (push) Successful in 5s
Docker images / backend-image (push) Successful in 2m36s
Docker images / frontend-image (push) Successful in 2m25s
Docker images / updater-image (push) Successful in 37s
Docker images / notify-webhook (push) Has been skipped
Docker images / publish-release (push) Successful in 6s
This commit is contained in:
@@ -13,16 +13,14 @@ import {
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog"
|
||||
import { formatAppVersionLabel, getAppVersion } from "@/lib/app-version"
|
||||
import {
|
||||
formatCommitSubject,
|
||||
getReleaseCommitPreview,
|
||||
RELEASE_COMMIT_PREVIEW_LIMIT,
|
||||
} from "@/lib/release-commits"
|
||||
import type { ReleaseManifest } from "@/lib/release-manifest"
|
||||
import { hasSeenReleaseModal, markReleaseModalSeen } from "@/lib/release-modal-storage"
|
||||
|
||||
function formatCommitSubject(subject: string): string {
|
||||
return subject.replace(
|
||||
/^(feat|fix|chore|docs|refactor|style|test|build|ci)(\([^)]+\))?!?:\s*/i,
|
||||
"",
|
||||
)
|
||||
}
|
||||
|
||||
export function ReleaseNotesModal() {
|
||||
const [open, setOpen] = React.useState(false)
|
||||
const [manifest, setManifest] = React.useState<ReleaseManifest | null>(null)
|
||||
@@ -60,6 +58,7 @@ export function ReleaseNotesModal() {
|
||||
}
|
||||
|
||||
const versionLabel = formatAppVersionLabel(manifest?.version ?? getAppVersion())
|
||||
const commits = getReleaseCommitPreview(manifest?.commits ?? [])
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={handleOpenChange}>
|
||||
@@ -69,14 +68,14 @@ export function ReleaseNotesModal() {
|
||||
Что нового в {versionLabel}
|
||||
</DialogTitle>
|
||||
<DialogDescription className="text-sm leading-relaxed">
|
||||
Краткая сводка изменений текущего релиза MikrotikManager.
|
||||
Последние {RELEASE_COMMIT_PREVIEW_LIMIT} коммитов текущей сборки MikrotikManager.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="min-h-0 flex-1 overflow-y-auto px-6 py-4">
|
||||
{manifest?.commits.length ? (
|
||||
{commits.length ? (
|
||||
<ul className="flex flex-col gap-2">
|
||||
{manifest.commits.map((commit) => (
|
||||
{commits.map((commit) => (
|
||||
<li
|
||||
key={commit.sha}
|
||||
className="rounded-lg border bg-card/80 p-3"
|
||||
|
||||
Reference in New Issue
Block a user