mirror of
https://github.com/harivansh-afk/asap.it.git
synced 2026-04-15 06:04:39 +00:00
first commit
This commit is contained in:
commit
1cdbffff09
200 changed files with 30007 additions and 0 deletions
73
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
73
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
name: "Bug report"
|
||||
description: Create a report to help us improve
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for reporting an issue :pray:.
|
||||
|
||||
This issue tracker is for bugs and issues found with [Bolt.new](https://bolt.new).
|
||||
If you experience issues related to WebContainer, please file an issue in our [WebContainer repo](https://github.com/stackblitz/webcontainer-core), or file an issue in our [StackBlitz core repo](https://github.com/stackblitz/core) for issues with StackBlitz.
|
||||
|
||||
The more information you fill in, the better we can help you.
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: Provide a clear and concise description of what you're running into.
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: link
|
||||
attributes:
|
||||
label: Link to the Bolt URL that caused the error
|
||||
description: Please do not delete it after reporting!
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Describe the steps we have to take to reproduce the behavior.
|
||||
placeholder: |
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: Provide a clear and concise description of what you expected to happen.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: screenshots
|
||||
attributes:
|
||||
label: Screen Recording / Screenshot
|
||||
description: If applicable, **please include a screen recording** (preferably) or screenshot showcasing the issue. This will assist us in resolving your issue <u>quickly</u>.
|
||||
- type: textarea
|
||||
id: platform
|
||||
attributes:
|
||||
label: Platform
|
||||
value: |
|
||||
- OS: [e.g. macOS, Windows, Linux]
|
||||
- Browser: [e.g. Chrome, Safari, Firefox]
|
||||
- Version: [e.g. 91.1]
|
||||
- type: input
|
||||
id: provider
|
||||
attributes:
|
||||
label: Provider Used
|
||||
description: Tell us the provider you are using.
|
||||
- type: input
|
||||
id: model
|
||||
attributes:
|
||||
label: Model Used
|
||||
description: Tell us the model you are using.
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context about the problem here.
|
||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Bolt.new related issues
|
||||
url: https://github.com/stackblitz/bolt.new/issues/new/choose
|
||||
about: Report issues related to Bolt.new (not Bolt.diy)
|
||||
- name: Chat
|
||||
url: https://thinktank.ottomator.ai
|
||||
about: Ask questions and discuss with other Bolt.diy users.
|
||||
23
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
23
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe:**
|
||||
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
**Describe the solution you'd like:**
|
||||
|
||||
<!-- A clear and concise description of what you want to happen. -->
|
||||
|
||||
**Describe alternatives you've considered:**
|
||||
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||
|
||||
**Additional context:**
|
||||
|
||||
<!-- Add any other context or screenshots about the feature request here. -->
|
||||
32
.github/actions/setup-and-build/action.yaml
vendored
Normal file
32
.github/actions/setup-and-build/action.yaml
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
name: Setup and Build
|
||||
description: Generic setup action
|
||||
inputs:
|
||||
pnpm-version:
|
||||
required: false
|
||||
type: string
|
||||
default: '9.4.0'
|
||||
node-version:
|
||||
required: false
|
||||
type: string
|
||||
default: '20.15.1'
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
|
||||
steps:
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: ${{ inputs.pnpm-version }}
|
||||
run_install: false
|
||||
|
||||
- name: Set Node.js version to ${{ inputs.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies and build project
|
||||
shell: bash
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm run build
|
||||
27
.github/workflows/ci.yaml
vendored
Normal file
27
.github/workflows/ci.yaml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup and Build
|
||||
uses: ./.github/actions/setup-and-build
|
||||
|
||||
- name: Run type check
|
||||
run: pnpm run typecheck
|
||||
|
||||
# - name: Run ESLint
|
||||
# run: pnpm run lint
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm run test
|
||||
33
.github/workflows/commit.yaml
vendored
Normal file
33
.github/workflows/commit.yaml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: Update Commit Hash File
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update-commit:
|
||||
if: contains(github.event.head_commit.message, '#release') != true
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get the latest commit hash
|
||||
run: echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||
|
||||
- name: Update commit file
|
||||
run: |
|
||||
echo "{ \"commit\": \"$COMMIT_HASH\" }" > app/commit.json
|
||||
|
||||
- name: Commit and push the update
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add app/commit.json
|
||||
git commit -m "chore: update commit hash to $COMMIT_HASH"
|
||||
git push
|
||||
33
.github/workflows/docs.yaml
vendored
Normal file
33
.github/workflows/docs.yaml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: Docs CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
build_docs:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./docs
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Configure Git Credentials
|
||||
run: |
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
key: mkdocs-material-${{ env.cache_id }}
|
||||
path: .cache
|
||||
restore-keys: |
|
||||
mkdocs-material-
|
||||
|
||||
- run: pip install mkdocs-material
|
||||
- run: mkdocs gh-deploy --force
|
||||
31
.github/workflows/pr-release-validation.yaml
vendored
Normal file
31
.github/workflows/pr-release-validation.yaml
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
name: PR Validation
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled, unlabeled]
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Validate PR Labels
|
||||
run: |
|
||||
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'stable-release') }}" == "true" ]]; then
|
||||
echo "✓ PR has stable-release label"
|
||||
|
||||
# Check version bump labels
|
||||
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'major') }}" == "true" ]]; then
|
||||
echo "✓ Major version bump requested"
|
||||
elif [[ "${{ contains(github.event.pull_request.labels.*.name, 'minor') }}" == "true" ]]; then
|
||||
echo "✓ Minor version bump requested"
|
||||
else
|
||||
echo "✓ Patch version bump will be applied"
|
||||
fi
|
||||
else
|
||||
echo "This PR doesn't have the stable-release label. No release will be created."
|
||||
fi
|
||||
25
.github/workflows/stale.yml
vendored
Normal file
25
.github/workflows/stale.yml
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
name: Mark Stale Issues and Pull Requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 2 * * *' # Runs daily at 2:00 AM UTC
|
||||
workflow_dispatch: # Allows manual triggering of the workflow
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Mark stale issues and pull requests
|
||||
uses: actions/stale@v8
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: "This issue has been marked as stale due to inactivity. If no further activity occurs, it will be closed in 7 days."
|
||||
stale-pr-message: "This pull request has been marked as stale due to inactivity. If no further activity occurs, it will be closed in 7 days."
|
||||
days-before-stale: 10 # Number of days before marking an issue or PR as stale
|
||||
days-before-close: 4 # Number of days after being marked stale before closing
|
||||
stale-issue-label: "stale" # Label to apply to stale issues
|
||||
stale-pr-label: "stale" # Label to apply to stale pull requests
|
||||
exempt-issue-labels: "pinned,important" # Issues with these labels won't be marked stale
|
||||
exempt-pr-labels: "pinned,important" # PRs with these labels won't be marked stale
|
||||
operations-per-run: 75 # Limits the number of actions per run to avoid API rate limits
|
||||
210
.github/workflows/update-stable.yml
vendored
Normal file
210
.github/workflows/update-stable.yml
vendored
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
name: Update Stable Branch
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update-commit:
|
||||
if: contains(github.event.head_commit.message, '#release')
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get the latest commit hash
|
||||
run: echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||
|
||||
- name: Update commit file
|
||||
run: |
|
||||
echo "{ \"commit\": \"$COMMIT_HASH\" }" > app/commit.json
|
||||
|
||||
- name: Commit and push the update
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add app/commit.json
|
||||
git commit -m "chore: update commit hash to $COMMIT_HASH"
|
||||
git push
|
||||
prepare-release:
|
||||
needs: update-commit
|
||||
if: contains(github.event.head_commit.message, '#release')
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name 'github-actions[bot]'
|
||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: latest
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup pnpm cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Get Current Version
|
||||
id: current_version
|
||||
run: |
|
||||
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
||||
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install semver
|
||||
run: pnpm add -g semver
|
||||
|
||||
- name: Determine Version Bump
|
||||
id: version_bump
|
||||
run: |
|
||||
COMMIT_MSG="${{ github.event.head_commit.message }}"
|
||||
if [[ $COMMIT_MSG =~ "#release:major" ]]; then
|
||||
echo "bump=major" >> $GITHUB_OUTPUT
|
||||
elif [[ $COMMIT_MSG =~ "#release:minor" ]]; then
|
||||
echo "bump=minor" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "bump=patch" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Bump Version
|
||||
id: bump_version
|
||||
run: |
|
||||
NEW_VERSION=$(semver -i ${{ steps.version_bump.outputs.bump }} ${{ steps.current_version.outputs.version }})
|
||||
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Update Package.json
|
||||
run: |
|
||||
NEW_VERSION=${{ steps.bump_version.outputs.new_version }}
|
||||
pnpm version $NEW_VERSION --no-git-tag-version --allow-same-version
|
||||
|
||||
- name: Generate Changelog
|
||||
id: changelog
|
||||
run: |
|
||||
# Get the latest tag
|
||||
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|
||||
|
||||
# Start changelog file
|
||||
echo "# Release v${{ steps.bump_version.outputs.new_version }}" > changelog.md
|
||||
echo "" >> changelog.md
|
||||
|
||||
if [ -z "$LATEST_TAG" ]; then
|
||||
echo "### 🎉 First Release" >> changelog.md
|
||||
echo "" >> changelog.md
|
||||
COMPARE_BASE="$(git rev-list --max-parents=0 HEAD)"
|
||||
else
|
||||
echo "### 🔄 Changes since $LATEST_TAG" >> changelog.md
|
||||
echo "" >> changelog.md
|
||||
COMPARE_BASE="$LATEST_TAG"
|
||||
fi
|
||||
|
||||
# Function to extract conventional commit type
|
||||
get_commit_type() {
|
||||
if [[ $1 =~ ^feat:|^feature: ]]; then echo "✨ Features";
|
||||
elif [[ $1 =~ ^fix: ]]; then echo "🐛 Bug Fixes";
|
||||
elif [[ $1 =~ ^docs: ]]; then echo "📚 Documentation";
|
||||
elif [[ $1 =~ ^style: ]]; then echo "💎 Styles";
|
||||
elif [[ $1 =~ ^refactor: ]]; then echo "♻️ Code Refactoring";
|
||||
elif [[ $1 =~ ^perf: ]]; then echo "⚡️ Performance Improvements";
|
||||
elif [[ $1 =~ ^test: ]]; then echo "✅ Tests";
|
||||
elif [[ $1 =~ ^build: ]]; then echo "🛠️ Build System";
|
||||
elif [[ $1 =~ ^ci: ]]; then echo "⚙️ CI";
|
||||
elif [[ $1 =~ ^chore: ]]; then echo "🔧 Chores";
|
||||
else echo "🔍 Other Changes";
|
||||
fi
|
||||
}
|
||||
|
||||
# Generate categorized changelog
|
||||
declare -A CATEGORIES
|
||||
declare -A COMMITS_BY_CATEGORY
|
||||
|
||||
# Get commits since last tag or all commits if no tag exists
|
||||
while IFS= read -r commit_line; do
|
||||
HASH=$(echo "$commit_line" | cut -d'|' -f1)
|
||||
MSG=$(echo "$commit_line" | cut -d'|' -f2)
|
||||
PR_NUM=$(echo "$commit_line" | cut -d'|' -f3)
|
||||
|
||||
CATEGORY=$(get_commit_type "$MSG")
|
||||
CATEGORIES["$CATEGORY"]=1
|
||||
|
||||
# Format commit message with PR link if available
|
||||
if [ -n "$PR_NUM" ]; then
|
||||
COMMITS_BY_CATEGORY["$CATEGORY"]+="- ${MSG#*: } ([#$PR_NUM](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/$PR_NUM))"$'\n'
|
||||
else
|
||||
COMMITS_BY_CATEGORY["$CATEGORY"]+="- ${MSG#*: }"$'\n'
|
||||
fi
|
||||
done < <(git log "${COMPARE_BASE}..HEAD" --pretty=format:"%H|%s|%(trailers:key=PR-Number,valueonly)" --reverse)
|
||||
|
||||
# Write categorized commits to changelog
|
||||
for category in "✨ Features" "🐛 Bug Fixes" "📚 Documentation" "💎 Styles" "♻️ Code Refactoring" "⚡️ Performance Improvements" "✅ Tests" "🛠️ Build System" "⚙️ CI" "🔧 Chores" "🔍 Other Changes"; do
|
||||
if [ -n "${COMMITS_BY_CATEGORY[$category]}" ]; then
|
||||
echo "#### $category" >> changelog.md
|
||||
echo "" >> changelog.md
|
||||
echo "${COMMITS_BY_CATEGORY[$category]}" >> changelog.md
|
||||
echo "" >> changelog.md
|
||||
fi
|
||||
done
|
||||
|
||||
# Add compare link if not first release
|
||||
if [ -n "$LATEST_TAG" ]; then
|
||||
echo "**Full Changelog**: [\`$LATEST_TAG..v${{ steps.bump_version.outputs.new_version }}\`](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/compare/$LATEST_TAG...v${{ steps.bump_version.outputs.new_version }})" >> changelog.md
|
||||
fi
|
||||
|
||||
# Save changelog content for the release
|
||||
CHANGELOG_CONTENT=$(cat changelog.md)
|
||||
echo "content<<EOF" >> $GITHUB_OUTPUT
|
||||
echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Commit and Tag Release
|
||||
run: |
|
||||
git pull
|
||||
git add package.json pnpm-lock.yaml changelog.md
|
||||
git commit -m "chore: release version ${{ steps.bump_version.outputs.new_version }}"
|
||||
git tag "v${{ steps.bump_version.outputs.new_version }}"
|
||||
git push
|
||||
git push --tags
|
||||
|
||||
- name: Update Stable Branch
|
||||
run: |
|
||||
if ! git checkout stable 2>/dev/null; then
|
||||
echo "Creating new stable branch..."
|
||||
git checkout -b stable
|
||||
fi
|
||||
git merge main --no-ff -m "chore: release version ${{ steps.bump_version.outputs.new_version }}"
|
||||
git push --set-upstream origin stable --force
|
||||
|
||||
- name: Create GitHub Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
VERSION="v${{ steps.bump_version.outputs.new_version }}"
|
||||
gh release create "$VERSION" \
|
||||
--title "Release $VERSION" \
|
||||
--notes "${{ steps.changelog.outputs.content }}" \
|
||||
--target stable
|
||||
Loading…
Add table
Add a link
Reference in a new issue