Skip to content

Commit

Permalink
🎉 chore: project init
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 18, 2023
0 parents commit fc8d3fa
Show file tree
Hide file tree
Showing 38 changed files with 759 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelogrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@lobehub/lint').changelog;
1 change: 1 addition & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@lobehub/lint').commitlint;
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
30 changes: 30 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Eslintignore for LobeHub
################################################################

# dependencies
node_modules

# ci
coverage
.coverage

# test
jest*
_test_
__test__

# umi
.umi
.umi-production
.umi-test
.dumi/tmp*
!.dumirc.ts

# production
dist
es
lib
logs

# misc
# add other ignore file below
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const config = require('@lobehub/lint').eslint;

module.exports = {
...config,
rules: {
...config.rules,
'unicorn/prefer-string-replace-all': 0,
},
};
5 changes: 5 additions & 0 deletions .fatherrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from 'father';

export default defineConfig({
esm: { output: 'dist' },
});
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/1_bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: '🐛 反馈缺陷 Bug Report'
description: '反馈一个问题缺陷 | Report an bug'
title: '[Bug] '
labels: '🐛 Bug'
body:
- type: dropdown
attributes:
label: '💻 系统环境 | Operating System'
options:
- Windows
- macOS
- Ubuntu
- Other Linux
- Other
validations:
required: true
- type: dropdown
attributes:
label: '🌐 浏览器 | Browser'
options:
- Chrome
- Edge
- Safari
- Firefox
- Other
validations:
required: true
- type: textarea
attributes:
label: '🐛 问题描述 | Bug Description'
description: A clear and concise description of the bug.
validations:
required: true
- type: textarea
attributes:
label: '🚦 期望结果 | Expected Behavior'
description: A clear and concise description of what you expected to happen.
- type: textarea
attributes:
label: '📷 复现步骤 | Recurrence Steps'
description: A clear and concise description of how to recurrence.
- type: textarea
attributes:
label: '📝 补充信息 | Additional Information'
description: If your problem needs further explanation, or if the issue you're seeing cannot be reproduced in a gist, please add more information here.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/2_feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: '🌠 功能需求 Feature Request'
description: '需求或建议 | Suggest an idea'
title: '[Request] '
labels: '🌠 Feature Request'
body:
- type: textarea
attributes:
label: '🥰 需求描述 | Feature Description'
description: Please add a clear and concise description of the problem you are seeking to solve with this feature request.
validations:
required: true
- type: textarea
attributes:
label: '🧐 解决方案 | Proposed Solution'
description: Describe the solution you'd like in a clear and concise manner.
validations:
required: true
- type: textarea
attributes:
label: '📝 补充信息 | Additional Information'
description: Add any other context about the problem here.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/3_question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: '😇 疑问或帮助 Help Wanted'
description: '疑问或需要帮助 | Need help'
title: '[Question] '
labels: '😇 Help Wanted'
body:
- type: textarea
attributes:
label: '🧐 问题描述 | Proposed Solution'
description: A clear and concise description of the proplem.
validations:
required: true
- type: textarea
attributes:
label: '📝 补充信息 | Additional Information'
description: Add any other context about the problem here.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/4_other.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: '📝 其他 Other'
about: '其他问题 | Other issues'
title: ''
labels: ''
assignees: ''
---
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#### 💻 变更类型 | Change Type

<!-- For change type, change [ ] to [x]. -->

- [ ] ✨ feat
- [ ] 🐛 fix
- [ ] 💄 style
- [ ] 🔨 chore
- [ ] 📝 docs

#### 🔀 变更说明 | Description of Change

<!-- Thank you for your Pull Request. Please provide a description above. -->

#### 📝 补充信息 | Additional Information

<!-- Add any other context about the Pull Request here. -->
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: monthly
time: '19:00'
timezone: 'Asia/Shanghai'
open-pull-requests-limit: 10
versioning-strategy: increase

- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: monthly
time: '19:00'
timezone: 'Asia/Shanghai'
32 changes: 32 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Dependabot Auto Merge
on:
pull_request_target:
types: [labeled, edited]

jobs:
merge:
if: contains(github.event.pull_request.labels.*.name, 'dependencies')
name: Dependabot Auto Merge
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install deps
run: pnpm install

- name: Merge
uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
command: merge
target: minor
github-token: ${{ secrets.GH_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/contributor-help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Contributor Helper

on:
# 🌏 Think about the planet! No need to update stats too frequently
schedule: [{ cron: '0 18 * * *' }]
# 💡 The following line lets you run workflow manually from the action tab!
workflow_dispatch:
jobs:
contributor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- uses: actions-cool/contributor-helper@v1
with:
token: ${{ secrets.GH_TOKEN }}
style: 'simple'
update-files: 'README.md'
update-places: '<!-- CONTRIBUTION GROUP -->/<!-- CONTRIBUTION END -->'

- name: Commit and push if changed
run: |-
git diff
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
git pull
git add -A
git commit -m "🤖 docs: Auto update contributors" || exit 0
git push
22 changes: 22 additions & 0 deletions .github/workflows/issue-check-inactive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Issue Check Inactive

on:
schedule:
- cron: '0 0 */15 * *'

permissions:
contents: read

jobs:
issue-check-inactive:
permissions:
issues: write # for actions-cool/issues-helper to update issues
pull-requests: write # for actions-cool/issues-helper to update PRs
runs-on: ubuntu-latest
steps:
- name: check-inactive
uses: actions-cool/issues-helper@v3
with:
actions: 'check-inactive'
inactive-label: 'Inactive'
inactive-day: 30
46 changes: 46 additions & 0 deletions .github/workflows/issue-close-require.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Issue Close Require

on:
schedule:
- cron: '0 0 * * *'

permissions:
contents: read

jobs:
issue-close-require:
permissions:
issues: write # for actions-cool/issues-helper to update issues
pull-requests: write # for actions-cool/issues-helper to update PRs
runs-on: ubuntu-latest
steps:
- name: need reproduce
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issues'
labels: '✅ Fixed'
inactive-day: 3
body: |
Since the issue was labeled with `✅ Fixed`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
由于该 issue 被标记为已修复,同时 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
- name: need reproduce
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issues'
labels: '🤔 Need Reproduce'
inactive-day: 3
body: |
Since the issue was labeled with `🤔 Need Reproduce`, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
由于该 issue 被标记为需要更多信息,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
- name: need reproduce
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issues'
labels: "🙅🏻‍♀️ WON'T DO"
inactive-day: 3
body: |
Since the issue was labeled with `🙅🏻‍♀️ WON'T DO`, and no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
由于该 issue 被标记为暂不处理,同时 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
25 changes: 25 additions & 0 deletions .github/workflows/issue-remove-inactive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Issue Remove Inactive

on:
issues:
types: [edited]
issue_comment:
types: [created, edited]

permissions:
contents: read

jobs:
issue-remove-inactive:
permissions:
issues: write # for actions-cool/issues-helper to update issues
pull-requests: write # for actions-cool/issues-helper to update PRs
runs-on: ubuntu-latest
steps:
- name: remove inactive
if: github.event.issue.state == 'open' && github.actor == github.event.issue.user.login
uses: actions-cool/issues-helper@v3
with:
actions: 'remove-labels'
issue-number: ${{ github.event.issue.number }}
labels: 'Inactive'
Loading

0 comments on commit fc8d3fa

Please sign in to comment.