chore: reset repository history
This commit is contained in:
commit
d528ce9578
59 files changed
+21559
No files matched your search
@@ -0,0 +1,2 @@
|
||||
custom: https://xi-xu.me/#sponsorships
|
||||
buy_me_a_coffee: xixu
|
||||
@@ -0,0 +1,76 @@
|
||||
name: Bug report
|
||||
description: Report a reproducible defect or regression in Xbin.
|
||||
title: '[bug]: '
|
||||
labels:
|
||||
- bug
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to report a bug.
|
||||
|
||||
Please include enough detail for someone else to reproduce the issue. For security-sensitive problems, stop here and use the private process in `SECURITY.md` instead.
|
||||
- type: textarea
|
||||
id: summary
|
||||
attributes:
|
||||
label: Summary
|
||||
description: What is the bug?
|
||||
placeholder: A short description of the issue.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Provide a minimal reproduction.
|
||||
placeholder: |
|
||||
1. Start the Worker with ...
|
||||
2. Open ...
|
||||
3. Submit ...
|
||||
4. Observe ...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
placeholder: What should have happened?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: actual
|
||||
attributes:
|
||||
label: Actual behavior
|
||||
placeholder: What happened instead?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
description: Share versions and runtime details that matter.
|
||||
placeholder: |
|
||||
- OS:
|
||||
- Bun:
|
||||
- Wrangler:
|
||||
- Browser:
|
||||
- Deployment mode:
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Logs, screenshots, or request samples
|
||||
description: Paste sanitized details only. Never include secrets or private data.
|
||||
render: text
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Checklist
|
||||
options:
|
||||
- label: I searched existing issues and pull requests first.
|
||||
required: true
|
||||
- label: I removed secrets and sensitive data from everything shared here.
|
||||
required: true
|
||||
- label: This is not a security vulnerability report.
|
||||
required: true
|
||||
@@ -0,0 +1,8 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Security vulnerability
|
||||
url: https://github.com/xixu-me/xbin/security/policy
|
||||
about: Report security issues privately using the repository security policy.
|
||||
- name: Private code of conduct report
|
||||
url: https://xi-xu.me/#contact
|
||||
about: Use the private maintainer contact listed on the maintainer website.
|
||||
@@ -0,0 +1,55 @@
|
||||
name: Feature request
|
||||
description: Suggest a scoped improvement that fits Xbin's core workflow.
|
||||
title: '[feature]: '
|
||||
labels:
|
||||
- enhancement
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for sharing an idea.
|
||||
|
||||
Xbin is intentionally focused on secure, encrypted paste sharing. Requests that stay close to that core are easier to review and maintain.
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: Problem or use case
|
||||
description: What problem are you trying to solve?
|
||||
placeholder: Describe the pain point or unmet need.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: Proposed change
|
||||
description: What would you like to happen?
|
||||
placeholder: Describe the behavior, flow, or API change you want.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
attributes:
|
||||
label: Alternatives considered
|
||||
description: What workarounds or alternatives have you considered?
|
||||
- type: textarea
|
||||
id: scope
|
||||
attributes:
|
||||
label: Why this fits Xbin
|
||||
description: Help explain how this aligns with the project's scope.
|
||||
placeholder: Explain why this improves secure paste sharing, compatibility, maintainability, or operations.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Mockups, API examples, screenshots, or related links.
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Checklist
|
||||
options:
|
||||
- label: I searched existing issues and pull requests first.
|
||||
required: true
|
||||
- label: I read the README and CONTRIBUTING guide.
|
||||
required: true
|
||||
@@ -0,0 +1,53 @@
|
||||
name: Question
|
||||
description: Ask for setup, deployment, or usage help.
|
||||
title: '[question]: '
|
||||
labels:
|
||||
- question
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for the question.
|
||||
|
||||
Please keep normal support in public issues so future users can benefit from the answer. For security issues, use `SECURITY.md` instead.
|
||||
- type: textarea
|
||||
id: goal
|
||||
attributes:
|
||||
label: What are you trying to do?
|
||||
placeholder: Describe the task or outcome you are aiming for.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: tried
|
||||
attributes:
|
||||
label: What have you already tried?
|
||||
placeholder: Commands, config changes, docs you read, or troubleshooting steps.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
placeholder: |
|
||||
- OS:
|
||||
- Bun:
|
||||
- Wrangler:
|
||||
- Browser:
|
||||
- Local or deployed:
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
label: Relevant config, logs, or screenshots
|
||||
description: Sanitize anything sensitive before posting.
|
||||
render: text
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Checklist
|
||||
options:
|
||||
- label: I searched existing issues and pull requests first.
|
||||
required: true
|
||||
- label: I removed secrets and sensitive data from everything shared here.
|
||||
required: true
|
||||
@@ -0,0 +1,26 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: bun
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:00'
|
||||
timezone: Asia/Shanghai
|
||||
commit-message:
|
||||
prefix: deps
|
||||
labels:
|
||||
- dependencies
|
||||
open-pull-requests-limit: 5
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
time: '09:30'
|
||||
timezone: Asia/Shanghai
|
||||
commit-message:
|
||||
prefix: ci
|
||||
labels:
|
||||
- dependencies
|
||||
- github-actions
|
||||
open-pull-requests-limit: 5
|
||||
@@ -0,0 +1,25 @@
|
||||
## Summary
|
||||
|
||||
Describe the change and why it is needed.
|
||||
|
||||
## Related issues
|
||||
|
||||
Link any related issues here.
|
||||
|
||||
## Validation
|
||||
|
||||
List the commands you ran and any manual checks you performed.
|
||||
|
||||
```text
|
||||
bun run format:check
|
||||
bun run check
|
||||
bun run test:coverage
|
||||
```
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] The change is focused and matches the project scope.
|
||||
- [ ] Tests were added or updated when behavior changed.
|
||||
- [ ] Documentation was updated when needed.
|
||||
- [ ] Generated Worker types were refreshed if Wrangler bindings changed.
|
||||
- [ ] No secrets, tokens, or private account data were committed.
|
||||
@@ -0,0 +1,95 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'LICENSE'
|
||||
- '.editorconfig'
|
||||
- '.gitattributes'
|
||||
- '.gitignore'
|
||||
- '.prettierignore'
|
||||
- '.prettierrc'
|
||||
- 'codecov.yml'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'LICENSE'
|
||||
- '.editorconfig'
|
||||
- '.gitattributes'
|
||||
- '.gitignore'
|
||||
- '.prettierignore'
|
||||
- '.prettierrc'
|
||||
- 'codecov.yml'
|
||||
merge_group:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
BUN_VERSION: 1.3.11
|
||||
|
||||
jobs:
|
||||
quality:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: ${{ env.BUN_VERSION }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Check formatting
|
||||
run: bun run format:check
|
||||
|
||||
- name: Check TypeScript
|
||||
run: bun run check
|
||||
|
||||
- name: Check generated Wrangler types
|
||||
run: bunx wrangler types --check
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: bun run test:coverage
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
files: ./coverage/lcov.info
|
||||
fail_ci_if_error: true
|
||||
use_oidc: true
|
||||
|
||||
deploy-dry-run:
|
||||
needs:
|
||||
- quality
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: ${{ env.BUN_VERSION }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Build deployment bundle without publishing
|
||||
run: bunx wrangler deploy --dry-run --keep-vars --message "CI dry run for ${GITHUB_SHA}"
|
||||
@@ -0,0 +1,64 @@
|
||||
name: Dependabot Auto Merge
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
- ready_for_review
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'LICENSE'
|
||||
- '.editorconfig'
|
||||
- '.gitattributes'
|
||||
- '.gitignore'
|
||||
- '.prettierignore'
|
||||
- '.prettierrc'
|
||||
- 'codecov.yml'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
concurrency:
|
||||
group: dependabot-automerge-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
enable:
|
||||
if: >
|
||||
github.actor == 'dependabot[bot]' &&
|
||||
github.event.pull_request.user.login == 'dependabot[bot]' &&
|
||||
github.event.pull_request.head.repo.full_name == github.repository &&
|
||||
github.event.pull_request.draft == false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fetch Dependabot metadata
|
||||
id: metadata
|
||||
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Approve safe update when repository settings allow it
|
||||
if: >
|
||||
contains(fromJSON('["version-update:semver-patch","version-update:semver-minor"]'), steps.metadata.outputs.update-type) ||
|
||||
(steps.metadata.outputs.update-type == 'version-update:semver-major' &&
|
||||
(steps.metadata.outputs.package-ecosystem == 'github-actions' ||
|
||||
steps.metadata.outputs.dependency-type == 'direct:development'))
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
run: gh pr review --approve "$PR_URL" --body "Safe Dependabot update approved for auto-merge."
|
||||
|
||||
- name: Enable auto-merge for safe update
|
||||
if: >
|
||||
contains(fromJSON('["version-update:semver-patch","version-update:semver-minor"]'), steps.metadata.outputs.update-type) ||
|
||||
(steps.metadata.outputs.update-type == 'version-update:semver-major' &&
|
||||
(steps.metadata.outputs.package-ecosystem == 'github-actions' ||
|
||||
steps.metadata.outputs.dependency-type == 'direct:development'))
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
run: gh pr merge --auto --merge "$PR_URL"
|
||||
@@ -0,0 +1,66 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- CI
|
||||
types:
|
||||
- completed
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
deployments: write
|
||||
|
||||
concurrency:
|
||||
group: deploy-production
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
BUN_VERSION: 1.3.11
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: >
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.event.workflow_run.conclusion == 'success' &&
|
||||
github.event.workflow_run.event == 'push' &&
|
||||
github.event.workflow_run.head_branch == 'main')
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
|
||||
steps:
|
||||
- name: Check out the revision that passed CI
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
|
||||
|
||||
- name: Set up Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: ${{ env.BUN_VERSION }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Verify deployment credentials
|
||||
env:
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
run: |
|
||||
if [ -z "$CLOUDFLARE_ACCOUNT_ID" ]; then
|
||||
echo "CLOUDFLARE_ACCOUNT_ID secret is required for deployment." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$CLOUDFLARE_API_TOKEN" ]; then
|
||||
echo "CLOUDFLARE_API_TOKEN secret is required for deployment." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Deploy to Cloudflare Workers
|
||||
env:
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
run: bunx wrangler deploy --keep-vars --message "GitHub Actions deploy for ${GITHUB_SHA}"
|
||||
Reference in new issue
Block a user