Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# See https://help.github.com/articles/about-codeowners/
# for more info about CODEOWNERS file

# It uses the same pattern rule for gitignore file
# https://git-scm.com/docs/gitignore#_pattern_format

# GitHub
.github/** @unknowIfGuestInDream

# Dev conf
.vscode/** @unknowIfGuestInDream
.editorconfig @unknowIfGuestInDream
.gitattributes @unknowIfGuestInDream
.gitignore @unknowIfGuestInDream

# Source
src/** @unknowIfGuestInDream

# Config files
package.json @unknowIfGuestInDream
tsconfig.json @unknowIfGuestInDream
eslint.config.mjs @unknowIfGuestInDream

# Document
LICENSE @unknowIfGuestInDream
README.md @unknowIfGuestInDream
CHANGELOG.md @unknowIfGuestInDream
67 changes: 67 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Bug report
description: Create a report to help us improve
title: "[Bug] "
labels:
- bug
assignees: unknowIfGuestInDream
body:
- type: input
id: vscode-version
attributes:
label: Which version of VS Code are you using?
description: You can find this in Help > About

- type: input
id: extension-version
attributes:
label: Which version of the extension are you using?
description: Check in Extensions panel

- type: checkboxes
id: operating-systems
attributes:
label: Which operating system are you using?
description: You may select more than one. Don't select anything if it's not about the environment.
options:
- label: macOS
- label: Windows
- label: Linux

- type: input
id: version
attributes:
label: Version since
description: Version since when the behavior is seen [e.g. 1.0.0]

- type: textarea
id: description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
id: reproduce-context
attributes:
label: To Reproduce
description: Steps to reproduce the behavior.

- type: textarea
id: expected-context
attributes:
label: Expected behavior
placeholder: A clear and concise description of what you expected to happen.

- type: textarea
id: screenshots-context
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.

- type: textarea
id: additional-context
attributes:
label: Additional context
description: If you are not reporting something obvious, a minimal reproduction and related log is required.
placeholder: Add any other context about the problem here. Especially if the issue occurs in certain OS, browser or configuration.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Feature request
description: Suggest an idea for this project
title: "[Feature Request] "
labels:
- enhancement
assignees: unknowIfGuestInDream
body:
- type: textarea
id: feature
attributes:
label: Describe the feature
description: Is your feature request related to a problem? Please describe.
placeholder: A clear and concise description of what the feature is, and what it will enhance or solve. Ex. I'm always frustrated when [...]

- type: textarea
id: solution-context
attributes:
label: Describe the solution you'd like
placeholder: A clear and concise description of what you want to happen.

- type: textarea
id: considered-context
attributes:
label: Describe alternatives you've considered
placeholder: A clear and concise description of any alternative solutions or features you've considered.

- type: textarea
id: additional-context
attributes:
label: Additional context
placeholder: Add any other context or screenshots about the feature request here.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/general-question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: General question
description: Ask a question here
title: "[Question] "
labels:
- question
assignees: unknowIfGuestInDream
body:
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: |-
Make sure that you follow these statements.
options:
- label: I am following the docs and I am sure I have tried searching for the problem.
required: true

- type: textarea
id: question
attributes:
label: Describe the question
description: What's it for
placeholder: write your question here
validations:
required: true
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "npm"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "friday"
timezone: "Asia/Shanghai"
labels:
- "workflow"
- "github_actions"
46 changes: 46 additions & 0 deletions .github/workflows/artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow packages the extension on every push to master
# Users can download the latest packaged extension from the artifacts

name: Artifact

on:
push:
branches: [master]
paths-ignore:
- '**.md'
- 'LICENSE'
- '.gitignore'
- 'images/**'

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Compile
run: npm run compile

- name: Package extension
run: npx @vscode/vsce package

- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: vscode-java-method-sorter-vsix
path: '*.vsix'
retention-days: 90
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will build and test the VS Code extension on each push and pull request

name: Build and Test

on:
push:
branches: [master]
paths-ignore:
- '**.md'
- 'LICENSE'
- '.gitignore'
pull_request:
branches: [master]
paths-ignore:
- '**.md'
- 'LICENSE'
- '.gitignore'

permissions:
contents: read

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v6
- name: Setup Node.js 22
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Compile
run: npm run compile
59 changes: 59 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This workflow allows manual publishing to VS Code Marketplace

name: Publish to VS Code Marketplace

on:
workflow_dispatch:
inputs:
bump_version:
description: 'Bump version before publish (patch/minor/major), leave empty to use current version'
required: false
type: choice
options:
- ''
- patch
- minor
- major

permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Configure Git
if: ${{ inputs.bump_version != '' }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Bump version
if: ${{ inputs.bump_version != '' }}
run: |
npm version ${{ inputs.bump_version }} -m "chore: bump version to %s"
git push
git push --tags

- name: Compile
run: npm run compile

- name: Publish to VS Code Marketplace
run: npx @vscode/vsce publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow builds and uploads artifacts on release

name: Build and Upload Artifacts on Release

on:
release:
types: [published]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Compile
run: npm run compile

- name: Package extension
run: npx @vscode/vsce package

- name: Upload artifact to release
uses: softprops/action-gh-release@v2
with:
files: '*.vsix'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading