Skip to content

Commit

Permalink
chore: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
ashgw committed Jan 17, 2025
2 parents 6449457 + 7accb8c commit b7a9ec1
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 37 deletions.
66 changes: 38 additions & 28 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
bug:
- 'fix:'
- 'bug:'
- 'error:'
feature:
- 'feat:'
enhancement:
- 'enhancement:'
- 'improvement:'
documentation:
- 'docs:'
- 'documentation:'
chore:
- 'chore:'
style:
- 'style:'
refactor:
- 'refactor:'
performance:
- 'perf:'
test:
- 'test:'
- 'tests:'
build:
- 'build:'
feat:
- head-branch: ["^feature", "feature", "feat"]

fix:
- head-branch: ["^fix", "fixed"]

tooling:
- changed-files:
- any-glob-to-any-file:
- tooling/*

ci:
- 'ci:'
revert:
- 'revert:'
- changed-files:
- any-glob-to-any-file:
- .github/*

infra:
- changed-files:
- any-glob-to-any-file:
- infra/*

env:
- changed-files:
- any-glob-to-any-file:
- packages/env/*
blog:
- changed-files:
- any-glob-to-any-file:
- apps/blog/*

www:
- changed-files:
- any-glob-to-any-file:
- apps/www/*

api:
- changed-files:
- any-glob-to-any-file:
- apps/api/*
20 changes: 20 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# this auto labels PRs based on the configuration file
# have a look at ./github/labeler.yml`
name: CI

on:
- pull_request_target

jobs:
label_pr-triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
if: github.repository_owner == 'ashgw'
steps:
- uses: actions/checkout@v4
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
8 changes: 1 addition & 7 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
repository: 'ashgw/ashgw.me'
repository: "ashgw/ashgw.me"

- name: Assign PR to opener
env:
Expand All @@ -25,12 +25,6 @@ jobs:
-d "{\"assignees\": [\"${OPENER}\"]}" \
https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/assignees
- name: Label PR based on commits
uses: actions/labeler@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true

- name: Validate PR title
uses: amannn/action-semantic-pull-request@v5
id: lint_pr_title
Expand Down
5 changes: 3 additions & 2 deletions packages/env/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { createEnv } from "@ashgw/ts-env";

config({ path: require("path").resolve(__dirname, "../../.env") });

const isBrowser = typeof window !== "undefined";

export const env = createEnv({
vars: {
NODE_ENV: z.enum(["production", "development", "preview"]),
Expand All @@ -15,6 +17,5 @@ export const env = createEnv({
},
disablePrefix: ["NODE_ENV"],
prefix: "NEXT_PUBLIC",
// @ts-expect-error skip in browser
skipValidation: typeof window === "undefined" ? false : true,
skipValidation: isBrowser,
});
1 change: 1 addition & 0 deletions packages/env/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": "@ashgw/tsconfig/base.json",
"include": ["."],
"compilerOptions": { "lib": ["DOM", "ES2022"] },
"exclude": ["node_modules"]
}

0 comments on commit b7a9ec1

Please sign in to comment.