Initial commit

This commit is contained in:
xixu-me committed 2025-07-09 17:58:55 +08:00
commit 84436e7998
20 files changed
+2746

No files matched your search

+107
View File
@@ -0,0 +1,107 @@
name: Bug Report
description: Report a bug or issue with the extension
title: "[Bug] "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please fill out the information below to help us resolve the issue.
- type: input
id: version
attributes:
label: Extension Version
description: What version of Xget for Chrome are you using?
placeholder: "1.0.0"
validations:
required: true
- type: dropdown
id: browser
attributes:
label: Browser
description: Which browser are you using?
options:
- Chrome
- Microsoft Edge
- Brave
- Other Chromium-based browser
validations:
required: true
- type: dropdown
id: platform
attributes:
label: Platform
description: Which platform were you using when the bug occurred?
options:
- GitHub
- GitLab
- Hugging Face
- All platforms
- Not platform-specific
validations:
required: true
- type: textarea
id: description
attributes:
label: Bug Description
description: A clear and concise description of what the bug is.
placeholder: "When I click on a download link..."
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '...'
3. See error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What you expected to happen
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened instead
validations:
required: true
- type: textarea
id: logs
attributes:
label: Console Logs
description: Any error messages from the browser console (F12 → Console)
render: text
- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context about the problem here
- type: checkboxes
id: checks
attributes:
label: Checklist
options:
- label: I have checked that this issue hasn't been reported before
required: true
- label: I have tried refreshing the page after changing extension settings
required: false
- label: I have checked the browser console for error messages
required: false
@@ -0,0 +1,83 @@
name: Feature Request
description: Suggest a new feature or enhancement
title: "[Feature] "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a new feature! Please provide details about your idea.
- type: textarea
id: problem
attributes:
label: Problem Description
description: Is your feature request related to a problem? Please describe.
placeholder: "I'm always frustrated when..."
validations:
required: true
- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the solution you'd like to see
placeholder: "I would like the extension to..."
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe any alternative solutions or features you've considered
- type: dropdown
id: platform
attributes:
label: Platform
description: Which platform would this feature apply to?
options:
- GitHub
- GitLab
- Hugging Face
- All platforms
- Extension UI/Settings
- Other
validations:
required: true
- type: dropdown
id: priority
attributes:
label: Priority
description: How important is this feature to you?
options:
- Low - Nice to have
- Medium - Would improve my workflow
- High - Critical for my use case
validations:
required: true
- type: textarea
id: use_case
attributes:
label: Use Case
description: Describe your specific use case for this feature
placeholder: "I download large files daily and need..."
- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context, screenshots, or examples about the feature request
- type: checkboxes
id: checks
attributes:
label: Checklist
options:
- label: I have searched existing issues to make sure this feature hasn't been requested
required: true
- label: This feature would benefit other users, not just my specific use case
required: false
+58
View File
@@ -0,0 +1,58 @@
name: General Question
description: Ask a question about the extension
title: "[Question] "
labels: ["question"]
body:
- type: markdown
attributes:
value: |
Have a question about Xget for Chrome? We're here to help!
- type: dropdown
id: category
attributes:
label: Question Category
description: What type of question is this?
options:
- Setup and Configuration
- Usage and Features
- Troubleshooting
- Compatibility
- Performance
- Security and Privacy
- Other
validations:
required: true
- type: textarea
id: question
attributes:
label: Your Question
description: What would you like to know?
placeholder: "How do I..."
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional Context
description: Provide any additional context that might help us answer your question
placeholder: "I'm trying to... but I'm having trouble with..."
- type: input
id: xget_domain
attributes:
label: Xget Domain (if relevant)
description: What Xget domain are you using?
placeholder: "xget.xi-xu.me"
- type: checkboxes
id: checks
attributes:
label: Checklist
options:
- label: I have checked the README and documentation
required: true
- label: I have searched existing issues for my question
required: true
+62
View File
@@ -0,0 +1,62 @@
# Pull Request
## Description
<!-- Provide a brief description of the changes in this PR -->
## Type of Change
<!-- Mark the relevant option with an "x" -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code refactoring (no functional changes)
- [ ] Performance improvement
## Related Issues
<!-- Link any related issues using #issue_number -->
Fixes #(issue_number)
## Changes Made
<!-- Describe the specific changes made in this PR -->
-
-
-
## Testing
<!-- Describe how you tested these changes -->
- [ ] Tested on GitHub
- [ ] Tested on GitLab
- [ ] Tested on Hugging Face
- [ ] Tested extension popup/settings
- [ ] Tested with multiple file types
- [ ] Verified no console errors
## Platform Compatibility
<!-- Check all platforms where you've tested the changes -->
- [ ] GitHub
- [ ] GitLab
- [ ] Hugging Face
## Browser Testing
<!-- Check browsers where you've tested -->
- [ ] Chrome
- [ ] Microsoft Edge
- [ ] Brave
- [ ] Other: ____________
## Screenshots/Videos
<!-- Add screenshots or videos if applicable -->
## Checklist
- [ ] I have read and followed the project guidelines
- [ ] My code follows the existing code style
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] My changes generate no new console errors or warnings
- [ ] I have tested that existing functionality still works
- [ ] Any new features include appropriate error handling
- [ ] The extension manifest version has been updated if needed
## Additional Notes
<!-- Add any additional notes or context for reviewers -->
@@ -0,0 +1,104 @@
name: Publish to Chrome Web Store
on:
push:
tags:
- "v*" # Triggers on version tags like v1.0.0, v1.2.3, etc.
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Validate manifest.json
run: |
# Validate that manifest.json is valid JSON
node -e "JSON.parse(require('fs').readFileSync('manifest.json', 'utf8'))"
echo "✅ manifest.json is valid"
- name: Extract version from tag
id: version
run: |
# Extract version from git tag (remove 'v' prefix if present)
VERSION=${GITHUB_REF#refs/tags/}
VERSION=${VERSION#v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"
- name: Update manifest version
run: |
# Update version in manifest.json to match the tag
node -e "
const fs = require('fs');
const manifest = JSON.parse(fs.readFileSync('manifest.json', 'utf8'));
manifest.version = '${{ steps.version.outputs.version }}';
fs.writeFileSync('manifest.json', JSON.stringify(manifest, null, 2));
console.log('Updated manifest.json version to:', manifest.version);
"
- name: Update package.json version
run: |
# Update version in package.json to match the tag
node -e "
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
pkg.version = '${{ steps.version.outputs.version }}';
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
console.log('Updated package.json version to:', pkg.version);
"
- name: Create extension package
run: |
# Create a zip file with all extension files
zip -r extension.zip . \
-x "*.git*" \
-x "node_modules/*" \
-x ".github/*" \
-x "*.md" \
-x "LICENSE" \
-x "*.zip"
echo "📦 Created extension.zip"
ls -la extension.zip
- name: Publish to Chrome Web Store
uses: mnao305/chrome-extension-upload@v5.0.0
with:
file-path: extension.zip
extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
publish: true # Set to false if you want to upload without publishing
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: extension.zip
generate_release_notes: true
body: |
## Xget for Chrome v${{ steps.version.outputs.version }}
This release has been automatically published to the Chrome Web Store.
### Changes
- See commit history for detailed changes
### Installation
- Install from [Chrome Web Store](https://chrome.google.com/webstore/detail/${{ secrets.CHROME_EXTENSION_ID }})
- Or download the extension.zip and load unpacked in Chrome Developer Mode
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Notify success
run: |
echo "🎉 Successfully published Xget for Chrome v${{ steps.version.outputs.version }} to Chrome Web Store!"
echo "🔗 Extension URL: https://chrome.google.com/webstore/detail/${{ secrets.CHROME_EXTENSION_ID }}"