-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat - Add initial project structure and configurations
- Loading branch information
Showing
26 changed files
with
3,343 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
LC_ALL=C | ||
|
||
local_branch="$(git rev-parse --abbrev-ref HEAD)" | ||
|
||
valid_branch_regex="^(penify|gitauto|dependabot|feature|fix|docs|style|refactor|perf|hotfix|test|chore|create)(\/[a-zA-Z0-9#._-]+)+$" | ||
|
||
message="There is something wrong with your branch name. Branch names in this project must adhere to this contract: $valid_branch_regex. Your commit will be rejected. You should rename your branch to a valid name and try again." | ||
|
||
if [[ ! $local_branch =~ $valid_branch_regex ]] | ||
then | ||
echo "$message" | ||
exit 1 | ||
fi | ||
|
||
npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh | ||
|
||
# This script generates an AI-powered commit message using dotnet-aicommitmessage. | ||
# It can be bypassed by setting the GIT_AICOMMIT_SKIP environment variable. | ||
|
||
# Exit immediately if GIT_AICOMMIT_SKIP is set | ||
if [ -n "$GIT_AICOMMIT_SKIP" ]; then | ||
exit 0 | ||
fi | ||
|
||
if ! command -v dotnet-aicommitmessage &> /dev/null; then | ||
echo "Error: dotnet-aicommitmessage is not installed or not in PATH" >&2 | ||
echo "Please install it by running 'dotnet tool install -g aicommitmessage'" >&2 | ||
exit 1 | ||
fi | ||
|
||
COMMIT_MSG_FILE=$1 | ||
CURRENT_MESSAGE=$(cat "$COMMIT_MSG_FILE") | ||
|
||
# From version 0.6.1, this is not needed anymore. | ||
# GIT_DIFF=$(git diff --staged) | ||
# GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
# Run dotnet-aicommitmessage with error handling | ||
# From version 0.6.1 branch and diff are now retrieved by the tool and don't need to be passed manually. | ||
# Version 0.6.1 and higher: dotnet-aicommitmessage generate-message -m "$CURRENT_MESSAGE" | ||
# Version 0.6.0 and lower: dotnet-aicommitmessage generate-message -m "$CURRENT_MESSAGE" -b "$GIT_BRANCH_NAME" -d "$GIT_DIFF" | ||
|
||
if ! AI_MESSAGE=$(dotnet-aicommitmessage generate-message -m "$CURRENT_MESSAGE"); then | ||
echo "Error: Failed to generate AI commit message. Using original message." >&2 | ||
exit 0 | ||
fi | ||
|
||
if [[ -z "$AI_MESSAGE" || "$AI_MESSAGE" =~ ^[[:space:]]*$ ]]; then | ||
echo "Error: Generated commit message is empty." >&2 | ||
exit 1 | ||
fi | ||
echo "$AI_MESSAGE" > "$COMMIT_MSG_FILE" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,32 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 50 | ||
assignees: | ||
- "guibranco" | ||
reviewers: | ||
- "guibranco" | ||
labels: | ||
- "npm" | ||
- "dependencies" | ||
groups: | ||
react: | ||
patterns: | ||
- "react*" | ||
|
||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 50 | ||
assignees: | ||
- "guibranco" | ||
reviewers: | ||
- "guibranco" | ||
labels: | ||
- "npm" | ||
- "dependencies" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 50 | ||
assignees: | ||
- "guibranco" | ||
reviewers: | ||
- "guibranco" | ||
labels: | ||
- "github-actions" | ||
- "dependencies" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 50 | ||
assignees: | ||
- "guibranco" | ||
reviewers: | ||
- "guibranco" | ||
labels: | ||
- "github-actions" | ||
- "dependencies" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build and Test on Pull Request | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test | ||
run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ name: Build & Deploy via ftp | |
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
|
@@ -17,54 +17,53 @@ jobs: | |
fullSemVer: ${{ steps.gitversion.outputs.fullSemVer }} | ||
|
||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.x' | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: "6.0.x" | ||
|
||
- name: Determine Version | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
useConfigFile: true | ||
- name: Determine Version | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
useConfigFile: true | ||
|
||
- name: Set up Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
- name: Set up Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test | ||
run: npm test | ||
- name: Test | ||
run: npm test | ||
|
||
- name: Upload build | ||
uses: sebastianpopp/ftp-action@releases/v2 | ||
with: | ||
host: ${{ secrets.FTP_SERVER }} | ||
user: ${{ secrets.FTP_USERNAME }} | ||
password: ${{ secrets.FTP_PASSWORD }} | ||
localDir: "build/" | ||
remoteDir: "/public_html/ui/sports-agenda/" | ||
options: "--delete" | ||
- name: Upload build | ||
uses: sebastianpopp/ftp-action@releases/v2 | ||
with: | ||
host: ${{ secrets.FTP_SERVER }} | ||
user: ${{ secrets.FTP_USERNAME }} | ||
password: ${{ secrets.FTP_PASSWORD }} | ||
localDir: "dist/" | ||
remoteDir: "/public_html/ui/sports-agenda/" | ||
options: "--delete" | ||
|
||
create_release: | ||
name: Create release | ||
needs: build | ||
runs-on: ubuntu-latest | ||
env: | ||
fullSemVer: ${{ needs.build.outputs.fullSemVer }} | ||
|
||
steps: | ||
- name: Create Release | ||
uses: ncipollo/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: size-label | ||
if: >- | ||
( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,9 @@ jobs: | |
Documentation: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Penify DocGen Client | ||
uses: SingularityX-ai/[email protected] | ||
with: | ||
client_id: ${{ secrets.SNORKELL_CLIENT_ID }} | ||
api_key: ${{ secrets.SNORKELL_API_KEY }} | ||
branch_name: "main" | ||
- name: Penify DocGen Client | ||
uses: SingularityX-ai/[email protected] | ||
with: | ||
client_id: ${{ secrets.SNORKELL_CLIENT_ID }} | ||
api_key: ${{ secrets.SNORKELL_API_KEY }} | ||
branch_name: "main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
Oops, something went wrong.