Skip to content

Commit 7117f00

Browse files
feat: add OSS health improvements and automation (#577)
* docs: add code of conduct and issue templates - Add CODE_OF_CONDUCT.md (Contributor Covenant v2.1) - Add bug report template with JEngine-specific fields - Add feature request template with package selection - Add template config with links to docs/QQ/DeepWiki Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * ci: add code coverage with Codecov integration - Add codecov.yml with per-package flag management - Enable coverage collection in unity-tests.yml - Add coverage upload job in pr-tests.yml - Ignore third-party packages from coverage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * ci: add OSS automation workflows and CODEOWNERS - Add stale.yml to auto-close inactive issues/PRs - Add scorecard.yml for OpenSSF security health checks - Add labeler.yml to auto-label PRs by file paths - Add CODEOWNERS for auto-review assignment - Add all-contributors config for contributor recognition Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * docs: add badges and coverage column to READMEs - Add Version and Tests badges to badge row - Add OpenSSF Scorecard badge - Add Coverage column to Official Packages table Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * fix(ci): fix coverage generation and add Best Practices badge - Add generateAdditionalMetrics to coverageOptions - Use step outputs for coverage path instead of hardcoded path - Fix coverage file permissions (generated as root by Docker) - Add debug logging for coverage files - Add OpenSSF Best Practices badge (project #11830) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * fix(ci): correct coverage file pattern for Codecov Unity Code Coverage generates TestCoverageResults_*.xml files, not coverage.xml. Update Codecov action to use correct pattern. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * ci: add top-level permissions to all workflows OpenSSF Scorecard requires explicit top-level permissions for the Token-Permissions check. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> --------- Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6cc9392 commit 7117f00

18 files changed

Lines changed: 554 additions & 10 deletions

.all-contributorsrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"projectName": "JEngine",
3+
"projectOwner": "JasonXuDeveloper",
4+
"repoType": "github",
5+
"repoHost": "https://github.com",
6+
"files": ["README.md"],
7+
"imageSize": 100,
8+
"commit": true,
9+
"commitConvention": "angular",
10+
"contributors": [],
11+
"contributorsPerLine": 7,
12+
"skipCi": true,
13+
"contributorsSortAlphabetically": false
14+
}

.github/CODEOWNERS

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# CODEOWNERS - Auto-assign reviewers for pull requests
2+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
3+
4+
# Default owner for everything
5+
* @JasonXuDeveloper
6+
7+
# Core package
8+
/UnityProject/Packages/com.jasonxudeveloper.jengine.core/ @JasonXuDeveloper
9+
10+
# Util package
11+
/UnityProject/Packages/com.jasonxudeveloper.jengine.util/ @JasonXuDeveloper
12+
13+
# CI/CD workflows
14+
/.github/workflows/ @JasonXuDeveloper
15+
16+
# Documentation
17+
/*.md @JasonXuDeveloper
18+
/docs/ @JasonXuDeveloper
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior in JEngine
3+
title: "[Bug]: "
4+
labels: ["bug", "needs-triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to report a bug! Please fill out the form below to help us investigate.
10+
11+
- type: input
12+
id: jengine-version
13+
attributes:
14+
label: JEngine Version
15+
description: What version of JEngine are you using?
16+
placeholder: "e.g., 1.0.9"
17+
validations:
18+
required: true
19+
20+
- type: input
21+
id: unity-version
22+
attributes:
23+
label: Unity Version
24+
description: What version of Unity are you using?
25+
placeholder: "e.g., 2022.3.55f1"
26+
validations:
27+
required: true
28+
29+
- type: dropdown
30+
id: platform
31+
attributes:
32+
label: Target Platform
33+
description: Which platform(s) are you experiencing this issue on?
34+
multiple: true
35+
options:
36+
- Windows
37+
- macOS
38+
- Linux
39+
- iOS
40+
- Android
41+
- WebGL
42+
- WeChat Mini Game
43+
- Douyin Mini Game
44+
- Alipay Mini Game
45+
- TapTap
46+
- Other
47+
validations:
48+
required: true
49+
50+
- type: textarea
51+
id: description
52+
attributes:
53+
label: Bug Description
54+
description: A clear and concise description of what the bug is.
55+
placeholder: Describe the bug...
56+
validations:
57+
required: true
58+
59+
- type: textarea
60+
id: reproduction
61+
attributes:
62+
label: Steps to Reproduce
63+
description: Steps to reproduce the behavior.
64+
placeholder: |
65+
1. Go to '...'
66+
2. Click on '...'
67+
3. See error
68+
validations:
69+
required: true
70+
71+
- type: textarea
72+
id: expected
73+
attributes:
74+
label: Expected Behavior
75+
description: What did you expect to happen?
76+
placeholder: Describe the expected behavior...
77+
validations:
78+
required: true
79+
80+
- type: textarea
81+
id: logs
82+
attributes:
83+
label: Error Logs
84+
description: Please paste any relevant error logs or stack traces.
85+
render: shell
86+
validations:
87+
required: false
88+
89+
- type: textarea
90+
id: additional
91+
attributes:
92+
label: Additional Context
93+
description: Add any other context, screenshots, or information about the problem.
94+
validations:
95+
required: false
96+
97+
- type: checkboxes
98+
id: checklist
99+
attributes:
100+
label: Checklist
101+
options:
102+
- label: I have searched existing issues to ensure this bug hasn't been reported before
103+
required: true
104+
- label: I have tested with the latest version of JEngine
105+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Documentation
4+
url: https://jengine.xgamedev.net/
5+
about: Check the documentation for guides and API reference
6+
- name: QQ Group (Chinese)
7+
url: https://jq.qq.com/?_wv=1027&k=cF4hODjW
8+
about: Join the QQ group for Chinese community support (921271552)
9+
- name: Ask DeepWiki
10+
url: https://deepwiki.com/JasonXuDeveloper/JEngine
11+
about: Ask AI about JEngine codebase
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement for JEngine
3+
title: "[Feature]: "
4+
labels: ["enhancement", "needs-triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for suggesting a feature! Please fill out the form below to help us understand your request.
10+
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Problem Statement
15+
description: Is your feature request related to a problem? Please describe.
16+
placeholder: "A clear description of what the problem is. Ex: I'm always frustrated when..."
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: solution
22+
attributes:
23+
label: Proposed Solution
24+
description: Describe the solution you'd like.
25+
placeholder: "A clear description of what you want to happen..."
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives Considered
33+
description: Describe any alternative solutions or features you've considered.
34+
placeholder: "Alternative approaches you've thought about..."
35+
validations:
36+
required: false
37+
38+
- type: dropdown
39+
id: package
40+
attributes:
41+
label: Related Package
42+
description: Which JEngine package is this feature related to?
43+
options:
44+
- JEngine.Core
45+
- JEngine.Util
46+
- New Package
47+
- Not sure
48+
validations:
49+
required: true
50+
51+
- type: textarea
52+
id: additional
53+
attributes:
54+
label: Additional Context
55+
description: Add any other context, mockups, or examples about the feature request.
56+
validations:
57+
required: false
58+
59+
- type: checkboxes
60+
id: checklist
61+
attributes:
62+
label: Checklist
63+
options:
64+
- label: I have searched existing issues to ensure this feature hasn't been requested before
65+
required: true
66+
- label: I would be willing to contribute this feature via a pull request
67+
required: false

.github/labeler.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Auto-labeler configuration
2+
# https://github.com/actions/labeler
3+
4+
# Core package changes
5+
core:
6+
- changed-files:
7+
- any-glob-to-any-file: 'UnityProject/Packages/com.jasonxudeveloper.jengine.core/**'
8+
9+
# Util package changes
10+
util:
11+
- changed-files:
12+
- any-glob-to-any-file: 'UnityProject/Packages/com.jasonxudeveloper.jengine.util/**'
13+
14+
# CI/CD changes
15+
ci:
16+
- changed-files:
17+
- any-glob-to-any-file: '.github/workflows/**'
18+
- any-glob-to-any-file: '.github/*.yml'
19+
20+
# Documentation changes
21+
documentation:
22+
- changed-files:
23+
- any-glob-to-any-file: '**/*.md'
24+
- any-glob-to-any-file: 'docs/**'
25+
26+
# Test changes
27+
tests:
28+
- changed-files:
29+
- any-glob-to-any-file: 'UnityProject/Assets/Tests/**'
30+
- any-glob-to-any-file: '**/*Tests*/**'
31+
- any-glob-to-any-file: '**/*.Tests.cs'
32+
33+
# Editor code changes
34+
editor:
35+
- changed-files:
36+
- any-glob-to-any-file: '**/Editor/**'
37+
38+
# Sample/demo changes
39+
samples:
40+
- changed-files:
41+
- any-glob-to-any-file: 'UnityProject/Assets/Samples/**'
42+
- any-glob-to-any-file: '**/Samples~/**'

.github/workflows/claude-code-review.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
# - "src/**/*.js"
1111
# - "src/**/*.jsx"
1212

13+
permissions:
14+
contents: read
15+
pull-requests: read
16+
issues: read
17+
1318
jobs:
1419
claude-review:
1520
# Optional: Filter by PR author

.github/workflows/claude.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ on:
1010
pull_request_review:
1111
types: [submitted]
1212

13+
permissions:
14+
contents: read
15+
pull-requests: read
16+
issues: read
17+
id-token: write
18+
1319
jobs:
1420
claude:
1521
if: |

.github/workflows/codeql.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
- cron: '0 0 * * 0'
1414
workflow_dispatch:
1515

16+
permissions:
17+
contents: read
18+
security-events: write
19+
1620
jobs:
1721
changes:
1822
name: Detect Changes

.github/workflows/labeler.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Auto Labeler
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
label:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Apply labels based on changed files
16+
uses: actions/labeler@v5
17+
with:
18+
repo-token: ${{ secrets.GITHUB_TOKEN }}
19+
configuration-path: .github/labeler.yml
20+
sync-labels: true

0 commit comments

Comments
 (0)