Skip to content

Commit 2f245ac

Browse files
committed
feat: Initial JDOxyGent4J
1 parent 7c1df13 commit 2f245ac

File tree

443 files changed

+374084
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

443 files changed

+374084
-222
lines changed

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
oxygent-studio/src/main/resources/web/** linguist-vendored
2+
oxygent-core/src/main/resources/static/** linguist-vendored
3+
4+
node_modules/** linguist-vendored
5+
target/** linguist-vendored
6+
build/** linguist-vendored
7+
dist/** linguist-vendored
8+
*.jar linguist-vendored
9+
*.war linguist-vendored
10+
*.min.js linguist-vendored
11+
*.min.css linguist-vendored
12+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: ['bug']
6+
assignees: ''
7+
---
8+
9+
## 🔍 Bug Description
10+
A clear and concise description of what the bug is.
11+
12+
## 🔄 Steps to Reproduce
13+
1. Go to '...'
14+
2. Click on '....'
15+
3. Scroll down to '....'
16+
4. See error
17+
18+
## ✅ Expected ~~~~Behavior
19+
A clear description of what you expected to happen.
20+
21+
## 🖥️ Environment
22+
- **Java Version:** [e.g. 17]
23+
- **Maven Version:** [e.g. 3.8.1]
24+
- **OS:** [e.g. macOS 12.0]
25+
- **JDOxyGent4J Version:** [e.g. 0.1.3-SNAPSHOT]
26+
27+
## 📸 Screenshots
28+
If applicable, add screenshots to help explain your problem.
29+
30+
## 📋 Additional Context
31+
Add any other context about the problem here.

.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: http://oxygent.jd.com/docs/
5+
about: Check out the project documentation
6+
- name: 💬 Discussions
7+
url: https://github.com/jd-opensource/JDOxyGent4J/discussions
8+
about: Join community discussions
9+
- name: 🌟 Examples
10+
url: https://github.com/jd-opensource/JDOxyGent4J/tree/main/oxygent-studio/src/main/java/com/jd/oxygent/web/examples/examples
11+
about: Browse code examples
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: ✨ Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: ['enhancement']
6+
assignees: ''
7+
---
8+
9+
## 🚀 Feature Description
10+
A clear and concise description of what you want to happen.
11+
12+
## 🎯 Use Case
13+
Describe the use case and value this feature would provide.
14+
15+
## 💡 Proposed Solution
16+
If you have implementation ideas, please describe them briefly.
17+
18+
## 🔄 Alternatives Considered
19+
A clear description of any alternative solutions or features you've considered.
20+
21+
## 📋 Additional Context
22+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: ❓ Question
3+
about: Ask a question about using OxyGent
4+
title: '[QUESTION] '
5+
labels: ['question']
6+
assignees: ''
7+
---
8+
9+
## ❓ Question
10+
A clear and concise description of your question.
11+
12+
## 💻 Code Example
13+
```java
14+
// Paste your relevant code snippet here
15+
```
16+
17+
## ⚙️ Configuration
18+
If related to configuration, please share relevant config files:
19+
20+
```yaml
21+
# Paste relevant configuration here
22+
```
23+
24+
## 🖥️ Environment
25+
- **Java Version:** [e.g. 17]
26+
- **JDOxyGent4J Version:** [e.g. 1.0.0]
27+
- **OS:** [e.g. macOS 12.0]
28+
29+
## 📋 Additional Context
30+
Add any other context about the question here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## 📝 Description
2+
Brief description of the changes in this PR.
3+
4+
## 🔄 Type of Change
5+
Please check the applicable options:
6+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
7+
- [ ] ✨ New feature (non-breaking change which adds functionality)
8+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
9+
- [ ] 🔧 Refactoring (code change that neither fixes a bug nor adds a feature)
10+
- [ ] 📚 Documentation update
11+
- [ ] 🧪 Test improvement
12+
- [ ] 🚀 Performance improvement
13+
- [ ] 🎨 Style/UI change
14+
15+
## 🧪 Testing
16+
- [ ] Unit tests added/updated
17+
- [ ] Integration tests added/updated
18+
- [ ] Manual testing completed
19+
- [ ] All existing tests pass
20+
21+
## 📋 Checklist
22+
- [ ] My code follows the project's style guidelines
23+
- [ ] I have performed a self-review of my own code
24+
- [ ] I have commented my code, particularly in hard-to-understand areas
25+
- [ ] I have made corresponding changes to the documentation
26+
- [ ] My changes generate no new warnings
27+
28+
## 🔗 Related Issues
29+
Closes #(issue number)
30+
31+
## 📸 Screenshots (if applicable)
32+
Add screenshots here if UI changes are involved.
33+
34+
## 📋 Additional Notes
35+
Any additional information that reviewers should know.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# .github/workflows/auto-manage-issues.yml
2+
3+
name: Auto Block Sensitive Issues
4+
5+
on:
6+
issues:
7+
types: [opened, edited]
8+
9+
jobs:
10+
auto-block-issues:
11+
permissions:
12+
issues: write
13+
contents: read
14+
if: github.actor != github.event.repository.owner.login
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Detect and block sensitive issues
18+
uses: actions/github-script@v7
19+
with:
20+
# 关键改动在这里!使用 | 将整个 script 内容作为块标量
21+
script: |
22+
// Get issue title and body (converted to lowercase)
23+
const title = context.payload.issue.title.toLowerCase();
24+
const body = context.payload.issue.body?.toLowerCase() || '';
25+
26+
// List of sensitive keywords in both Chinese and English
27+
const blockKeywords = [
28+
// Chinese keywords
29+
'刷星', '刷赞', '买星', '买赞', '虚假star', '假星',
30+
'可疑账号', '刷热度', '买热度', 'basinarapprowayl',
31+
'刷issue', '刷评论', '买issue', '买评论', '虚假issue', '假issue',
32+
'刷贡献', '买贡献', '贡献造假', 'issue 刷量', '评论 刷量',
33+
34+
// English keywords
35+
'star farming', 'buy star', 'fake star', 'fake stars',
36+
'artificial stars', 'star manipulation', 'buy github stars',
37+
'suspicious account', 'bot accounts', 'issue farming',
38+
'comment spam', 'spam comments', 'fake issue', 'fake issues',
39+
'buy issue', 'buy issues', 'buy comments', 'contribution fraud',
40+
'activity farming', 'gaming the system'
41+
];
42+
43+
// Check if the title or body contains any of the sensitive keywords
44+
const shouldBlock = blockKeywords.some(keyword =>
45+
title.includes(keyword.toLowerCase()) ||
46+
body.includes(keyword.toLowerCase())
47+
);
48+
49+
if (shouldBlock) {
50+
console.log(`Blocking sensitive issue #${context.issue.number}`);
51+
52+
// 1. Add a blocked label
53+
try {
54+
await github.rest.issues.addLabels({
55+
owner: context.repo.owner,
56+
repo: context.repo.repo,
57+
issue_number: context.issue.number,
58+
labels: ['🚫 blocked']
59+
});
60+
} catch (error) {
61+
console.log('Failed to add label:', error);
62+
}
63+
64+
// 2. Add an automated comment explaining the action
65+
await github.rest.issues.createComment({
66+
owner: context.repo.owner,
67+
repo: context.repo.repo,
68+
issue_number: context.issue.number,
69+
body: "---\n<strong>⚠️ Content Blocked Notification</strong>\n\nThis issue has been automatically blocked because it contains restricted content. The project maintenance team only accepts technical discussions related to code development, feature implementation, and bug fixes.\n\nAccording to our community guidelines, meta-discussions about project popularity, Star counts, or any form of artificial activity are not within the scope of this repository.\n\n*This action was performed by an automated system.*"
70+
});
71+
72+
// 3. Immediately close the issue
73+
await github.rest.issues.update({
74+
owner: context.repo.owner,
75+
repo: context.repo.repo,
76+
issue_number: context.issue.number,
77+
state: 'closed'
78+
});
79+
80+
// 4. Lock the issue to prevent further comments
81+
await github.rest.issues.lock({
82+
owner: context.repo.owner,
83+
repo: context.repo.repo,
84+
issue_number: context.issue.number
85+
});
86+
87+
console.log('Issue has been closed and locked');
88+
} else {
89+
console.log('No sensitive content detected, skipping processing');
90+
}

.gitignore

Lines changed: 49 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,54 @@
1-
# Compiled class file
2-
*.class
1+
HELP.md
2+
target/
3+
.flattened-pom.xml
4+
dependency-reduced-pom.xml
5+
!.mvn/wrapper/maven-wrapper.jar
6+
!**/src/main/**/target/
7+
!**/src/test/**/target/
8+
/cache_dir/
39

4-
# Log file
5-
*.log
10+
### STS ###
11+
.apt_generated
12+
.classpath
13+
.factorypath
14+
.project
15+
.settings
16+
.springBeans
17+
.sts4-cache
18+
.DS_Store
19+
20+
### IntelliJ IDEA ###
21+
.idea/
22+
.idea
23+
*.iws
24+
*.iml
25+
*.ipr
26+
*.json
27+
*.bak
28+
29+
### NetBeans ###
30+
/nbproject/private/
31+
/nbbuild/
32+
/dist/
33+
/nbdist/
34+
/.nb-gradle/
35+
build/
36+
!**/src/main/**/build/
37+
!**/src/test/**/build/
38+
log
39+
40+
### VS Code ###
41+
.vscode/
642

7-
# BlueJ files
8-
*.ctxt
943

10-
# Mobile Tools for Java (J2ME)
11-
.mtj.tmp/
44+
### VS Code ###
45+
.joycode/
46+
.env
47+
48+
*.jsonl
49+
*.log
50+
cache_dir/
51+
52+
### github ###
1253

13-
# Package Files #
14-
*.jar
15-
*.war
16-
*.nar
17-
*.ear
18-
*.zip
19-
*.tar.gz
20-
*.rar
2154

22-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23-
hs_err_pid*
24-
replay_pid*

0 commit comments

Comments
 (0)