Skip to content
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

[TL-DYS-111] #206

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
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
22 changes: 22 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Get the current branch name
branch_name=$(git rev-parse --abbrev-ref HEAD)

# Define your allowed patterns
main_branch="main"
feature_branch_pattern="^TL-DYS-[0-9]+$"

# Check if branch name is valid
if [ "$branch_name" != "$main_branch" ] && ! echo "$branch_name" | grep -Eq "$feature_branch_pattern"; then
echo "Warning: Branch name '$branch_name' is invalid. Must be '$main_branch' or match pattern 'TL-DYS-<NUMBER>'."

# Ask the user if they want to bypass the check
echo "Do you want to bypass the branch name check and continue? (yes/no)"
read -r answer

if [ "$answer" != "yes" ]; then
echo "Commit/push aborted due to invalid branch name."
exit 1
fi
fi

# Run the rest of the pre-commit/pre-push hook (e.g., lint-staged)
npx lint-staged --concurrent false --relative
6 changes: 3 additions & 3 deletions client/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ export const metadata: Metadata = {
"Innovative Project Generator",
"DIY Creativity",
],
metadataBase: new URL("https://www.diyspire.online/"),
metadataBase: new URL("https://www.diyspire.com/"),
applicationName: "DIYspire",
openGraph: {
type: "website",
url: "https://www.diyspire.online/",
url: "https://www.diyspire.com/",
title: "DIYspire - AI-Powered DIY Project Idea Generator",
description: "Unleash a world of unique DIY project ideas with DIYspire, an AI-powered generator backed by OpenAI. Ignite your creativity and embark on your next inventive journey.",
},
twitter: {
site: "https://www.diyspire.online/",
site: "https://www.diyspire.com/",
title: "DIYspire - AI-Powered DIY Project Idea Generator",
description: "Unleash a world of unique DIY project ideas with DIYspire, an AI-powered generator backed by OpenAI. Ignite your creativity and embark on your next inventive journey.",
},
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@
"prettier-plugin-tailwindcss"
]
},
"homepage": "https://www.diyspire.online"
"homepage": "https://www.diyspire.com"
}
4 changes: 2 additions & 2 deletions client/public/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ User-agent: *
Allow: /

# Host
Host: https://www.diyspire.online
Host: https://www.diyspire.com

# Sitemaps
Sitemap: https://www.diyspire.online/sitemap.xml
Sitemap: https://www.diyspire.com/sitemap.xml
6 changes: 3 additions & 3 deletions server/src/queue/emailQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ export const processEmailQueue = async (
}

const generatedHtml = await fillTemplate(join(__dirname, "..", "template", "index.html"), {
header_image: "https://www.diyspire.online/android-chrome-192x192.png",
header_alt: "DIYspire - diyspire.online logo",
header_image: "https://www.diyspire.com/android-chrome-192x192.png",
header_alt: "DIYspire - diyspire.com logo",
header_title: "DIYspire",
welcome_title: projectIdea.welcome.title,
welcome_content: projectIdea.welcome.content,
Expand All @@ -167,7 +167,7 @@ export const processEmailQueue = async (
project_time: projectIdea.time,
project_budget: projectIdea.budget,
project_currency: projectIdea.currency,
cta_url: "https://www.diyspire.online/?is_safe=false",
cta_url: "https://www.diyspire.com/?is_safe=false",
project_steps: generateProjectSteps(projectIdea.details),
});

Expand Down
3 changes: 1 addition & 2 deletions server/src/template/backup.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ <h3>{{suggested_diy.title}}</h3>
<a href="http://www.example.com">www.example.com</a>
</p>
<p class="unsubscribe">
© Copyright, 2024, diyspire.online • We only deliver things people are happy to receive, and you received this email as a subscriber of diyspire.online. Although we'll be sad, you may
choose to
© Copyright, 2024, diyspire.com • We only deliver things people are happy to receive, and you received this email as a subscriber of diyspire.com. Although we'll be sad, you may choose to
<a href="{{unsubscribe_url}}">unsubscribe</a>. We understand, but we'll be sad.
</p>
</div>
Expand Down
3 changes: 1 addition & 2 deletions server/src/template/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@
<a href="http://www.example.com">www.example.com</a>
</p>
<p class="unsubscribe">
© Copyright, 2024, diyspire.online • We only deliver things people are happy to receive, and you received this email as a subscriber of diyspire.online. Although we'll be sad, you may
choose to
© Copyright, 2024, diyspire.com • We only deliver things people are happy to receive, and you received this email as a subscriber of diyspire.com. Although we'll be sad, you may choose to
<a href="{{unsubscribe_url}}">unsubscribe</a>. We understand, but we'll be sad.
</p>
</div>
Expand Down
Loading