This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 723fafc
Showing
428 changed files
with
40,802 additions
and
0 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,6 @@ | ||
GTM_ID=xxxx | ||
UMAMI_PROJECT_API_KEY=xxxx | ||
UMAMI_APP_URL=xxxx | ||
ALGOLIA_API_KEY=xxxx | ||
ALGOLIA_APP_ID=xxxx | ||
GITHUB_ACCESS_TOKEN=xxxx |
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,40 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve Jan | ||
title: 'bug: [DESCRIPTION]' | ||
labels: 'type: bug' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**Steps to reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your issue. | ||
|
||
**Environment details** | ||
- Operating System: [Specify your OS. e.g., MacOS Sonoma 14.2.1, Windows 11, Ubuntu 22, etc] | ||
- Jan Version: [e.g., 0.4.3] | ||
- Processor: [e.g., Apple M1, Intel Core i7, AMD Ryzen 5, etc] | ||
- RAM: [e.g., 8GB, 16GB] | ||
- Any additional relevant hardware specifics: [e.g., Graphics card, SSD/HDD] | ||
|
||
**Logs** | ||
If the cause of the error is not clear, kindly provide your usage logs: | ||
- `tail -n 50 ~/jan/logs/app.log` if you are using the UI | ||
- `tail -n 50 ~/jan/logs/server.log` if you are using the local api server | ||
Making sure to redact any private information. | ||
|
||
**Additional context** | ||
Add any other context or information that could be helpful in diagnosing the problem. |
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 @@ | ||
--- | ||
name: Discussion thread | ||
about: Start an open ended discussion | ||
title: 'Discussion: [TOPIC HERE]' | ||
labels: 'type: discussion' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Motivation** | ||
|
||
**Discussion** | ||
|
||
**Alternatives** | ||
|
||
**Resources** |
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,17 @@ | ||
--- | ||
name: Documentation request | ||
about: Documentation requests | ||
title: 'docs: TITLE' | ||
labels: 'type: documentation' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Pages** | ||
- Page(s) that need to be done | ||
|
||
**Success Criteria** | ||
Content that should be covered | ||
|
||
**Additional context** | ||
Examples, reference pages, resources |
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,25 @@ | ||
--- | ||
name: Epic request | ||
about: Suggest an idea for this project | ||
title: 'epic: [DESCRIPTION]' | ||
labels: 'type: epic' | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Motivation | ||
- | ||
|
||
## Specs | ||
- | ||
|
||
## Designs | ||
[Figma](link) | ||
|
||
## Tasklist | ||
- [ ] | ||
|
||
## Not in Scope | ||
- | ||
|
||
## Appendix |
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,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: 'feat: [DESCRIPTION]' | ||
labels: 'type: feature request' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Problem** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Success Criteria** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,14 @@ | ||
## Describe Your Changes | ||
|
||
- | ||
|
||
## Fixes Issues | ||
|
||
- Closes # | ||
- Closes # | ||
|
||
## Self Checklist | ||
|
||
- [ ] Added relevant comments, esp in complex areas | ||
- [ ] Updated docs (for bug fixes / features) | ||
- [ ] Created issues for follow-up changes or refactoring needed |
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,14 @@ | ||
# Auto assign author, tags, and reviewers to pull requests | ||
name: "Auto Assign Author" | ||
on: | ||
pull_request: | ||
types: [opened] | ||
jobs: | ||
assign-author: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- uses: toshimaru/[email protected] | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" |
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,35 @@ | ||
name: "Auto Label Conventional Commits" | ||
on: | ||
pull_request: | ||
types: | ||
- reopened | ||
- opened | ||
jobs: | ||
label_prs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Label PRs | ||
run: | | ||
ISSUE_TITLE=$(gh issue view ${{ github.event.number }} --json title -q ".title") | ||
case "$ISSUE_TITLE" in | ||
chore:*) LABEL="type: chore" ;; | ||
feat:*) LABEL="type: feature request" ;; | ||
perf:*) LABEL="type: enhancement" ;; | ||
fix:*) LABEL="type: bug" ;; | ||
docs:*) LABEL="type: documentation" ;; | ||
ci:*) LABEL="type: ci" ;; | ||
build:*) LABEL="type: ci" ;; | ||
test:*) LABEL="type: chore" ;; | ||
style:*) LABEL="type: chore" ;; | ||
refactor:*) LABEL="type: chore" ;; | ||
*) LABEL="" ;; | ||
esac | ||
if [ -n "$LABEL" ]; then | ||
gh issue edit ${{ github.event.number }} --add-label "$LABEL" | ||
fi | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
52 changes: 52 additions & 0 deletions
52
.github/workflows/clean-cloudflare-page-preview-url-and-r2.yml
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,52 @@ | ||
name: "Clean old cloudflare pages preview urls and nightly build" | ||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # every day at 00:00 | ||
workflow_dispatch: | ||
|
||
jobs: | ||
clean-cloudflare-pages-preview-urls: | ||
strategy: | ||
matrix: | ||
project: ["jan", "nitro", "docs"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- name: install requests | ||
run: | | ||
python3 -m pip install requests pytz tqdm | ||
- name: Python Inline script | ||
uses: jannekem/run-python-script-action@v1 | ||
with: | ||
script: | | ||
import requests | ||
from datetime import datetime, UTC | ||
from pytz import timezone | ||
from tqdm import tqdm | ||
# Configuration | ||
endpoint = "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CLOUDFLARE_ACCOUNT_ID }}/pages/projects/${{ matrix.project }}/deployments" | ||
expiration_days = 3 | ||
headers = { | ||
"Content-Type": "application/json;charset=UTF-8", | ||
"Authorization": "Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}" | ||
} | ||
utc_tz = timezone('UTC') | ||
# Fetch the list of deployments | ||
response = requests.get(endpoint, headers=headers) | ||
deployments = response.json() | ||
for deployment in tqdm(deployments['result']): | ||
# Calculate the age of the deployment | ||
created_on = datetime.strptime(deployment['created_on'], "%Y-%m-%dT%H:%M:%S.%fZ").replace(tzinfo=utc_tz) | ||
if (datetime.now(UTC) - created_on).days > expiration_days: | ||
# Delete the deployment | ||
delete_response = requests.delete(f"{endpoint}/{deployment['id']}", headers=headers) | ||
if delete_response.status_code == 200: | ||
print(f"Deleted deployment: {deployment['id']}") | ||
else: | ||
print(f"Failed to delete deployment: {deployment['id']}") | ||
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,101 @@ | ||
name: Jan Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
# Review gh actions docs if you want to further define triggers, paths, etc | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to GitHub Pages | ||
env: | ||
CLOUDFLARE_PROJECT_NAME: docs | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
deployments: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install jq | ||
uses: dcarbone/[email protected] | ||
|
||
- name: Fill env vars | ||
run: | | ||
env_example_file=".env.example" | ||
touch .env | ||
while IFS= read -r line || [[ -n "$line" ]]; do | ||
if [[ "$line" == *"="* ]]; then | ||
var_name=$(echo $line | cut -d '=' -f 1) | ||
echo $var_name | ||
var_value="$(jq -r --arg key "$var_name" '.[$key]' <<< "$SECRETS")" | ||
echo "$var_name=$var_value" >> .env | ||
fi | ||
done < "$env_example_file" | ||
env: | ||
SECRETS: '${{ toJson(secrets) }}' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
- name: Build website | ||
run: sed -i '/process.env.DEBUG = namespaces;/c\// process.env.DEBUG = namespaces;' ./node_modules/debug/src/node.js && yarn build | ||
|
||
- name: Publish to Cloudflare Pages PR Preview and Staging | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/dev' | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }} | ||
directory: ./docs/build | ||
branch: main | ||
# Optional: Enable this if you want to have GitHub Deployments triggered | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish to Cloudflare Pages PR Preview and Staging | ||
if: github.event_name == 'pull_request' | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }} | ||
directory: ./docs/build | ||
# Optional: Enable this if you want to have GitHub Deployments triggered | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | ||
id: deployCloudflarePages | ||
|
||
- uses: mshick/add-pr-comment@v2 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
message: | | ||
Preview URL: ${{ steps.deployCloudflarePages.outputs.url }} | ||
- name: Add Custome Domain file | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/docs' && github.event.pull_request.head.repo.full_name != github.repository | ||
run: echo "${{ vars.DOCUSAURUS_DOMAIN }}" > ./docs/build/CNAME | ||
|
||
# Popular action to deploy to GitHub Pages: | ||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus | ||
- name: Deploy to GitHub Pages | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/docs' && github.event.pull_request.head.repo.full_name != github.repository | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# Build output to publish to the `gh-pages` branch: | ||
publish_dir: ./docs/build | ||
# The following lines assign commit authorship to the official | ||
# GH-Actions bot for deploys to `gh-pages` branch: | ||
# https://github.com/actions/checkout/issues/13#issuecomment-724415212 | ||
# The GH actions bot is used by default if you didn't specify the two fields. | ||
# You can swap them out with your own user credentials. | ||
user_name: github-actions[bot] | ||
user_email: 41898282+github-actions[bot]@users.noreply.github.com |
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,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
Oops, something went wrong.