Skip to content

Commit 2eaffed

Browse files
authored
Merge pull request #15 from Black-Cockpit/refactor/adding_contribution_guide_line
Refactor/adding contribution guide line
2 parents d297ebc + 4fceeff commit 2eaffed

File tree

12 files changed

+379
-8
lines changed

12 files changed

+379
-8
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve NETCore.Keycloak
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.
14+
2.
15+
3.
16+
17+
## ✅ Expected Behavior
18+
<!-- What you expected to happen -->
19+
20+
## ❌ Actual Behavior
21+
<!-- What actually happened -->
22+
23+
## 🔧 Environment
24+
- NETCore.Keycloak Version:
25+
- .NET Version:
26+
- Keycloak Server Version:
27+
- Operating System:
28+
29+
## 📚 Additional Context
30+
<!-- Add any other context about the problem here -->
31+
32+
## 💡 Possible Solution
33+
<!-- If you have suggestions on how to fix the bug -->
34+
35+
## 📸 Screenshots
36+
<!-- If applicable, add screenshots to help explain your problem -->
37+
38+
## 📊 Logs
39+
<!-- If applicable, add relevant log outputs -->
40+
```
41+
[Paste logs here]
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Documentation Improvement
3+
about: Suggest improvements to NETCore.Keycloak documentation
4+
title: '[DOCS] '
5+
labels: 'documentation'
6+
assignees: ''
7+
---
8+
9+
## 📚 Documentation Area
10+
<!-- Specify which documentation needs improvement (API docs, README, Wiki, etc.) -->
11+
12+
## 📝 Current Documentation
13+
<!-- Describe what's currently in the documentation -->
14+
15+
## ✨ Proposed Changes
16+
<!-- Describe what should be changed or added -->
17+
18+
## 🎯 Reason for Change
19+
<!-- Why is this change needed? -->
20+
21+
## 📋 Additional Context
22+
<!-- Add any other context about the documentation improvement -->
23+
24+
## ✅ Checklist
25+
- [ ] Checked for existing documentation
26+
- [ ] Provided clear examples (if applicable)
27+
- [ ] Checked for technical accuracy
28+
- [ ] Ensured proper formatting
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature for NETCore.Keycloak
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
assignees: ''
7+
---
8+
9+
## ✨ Feature Description
10+
<!-- A clear and concise description of the feature you're proposing -->
11+
12+
## 🎯 Use Case
13+
<!-- Describe the use case(s) that this feature would address -->
14+
15+
## 💡 Proposed Solution
16+
<!-- Describe your proposed solution and how it would work -->
17+
18+
## 🔄 Alternative Solutions
19+
<!-- Describe any alternative solutions or features you've considered -->
20+
21+
## 📝 Additional Context
22+
<!-- Add any other context, screenshots, or examples about the feature request -->
23+
24+
## ✅ Implementation Checklist
25+
- [ ] Feature design document
26+
- [ ] Unit tests
27+
- [ ] Documentation updates
28+
- [ ] API documentation (if applicable)
29+
- [ ] Example code (if applicable)
30+
31+
## 🔗 Related Issues/PRs
32+
<!-- Link any related issues or pull requests -->
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Refactor Proposal
3+
about: Propose code refactoring to improve NETCore.Keycloak
4+
title: '[REFACTOR] '
5+
labels: 'refactor'
6+
assignees: ''
7+
---
8+
9+
## 🔄 Refactor Scope
10+
<!-- Describe which part of the codebase needs refactoring -->
11+
12+
## 📝 Current Implementation
13+
<!-- Describe the current implementation and its issues -->
14+
15+
## ✨ Proposed Changes
16+
<!-- Describe your proposed refactoring changes -->
17+
18+
## 🎯 Benefits
19+
<!-- List the benefits of this refactoring -->
20+
21+
## ⚠️ Potential Risks
22+
<!-- Describe any potential risks or challenges -->
23+
24+
## 📋 Implementation Plan
25+
- [ ] Unit tests for new implementation
26+
- [ ] Refactor implementation
27+
- [ ] Update documentation
28+
- [ ] Performance testing (if applicable)
29+
- [ ] Migration guide (if breaking changes)
30+
31+
## 📚 Additional Context
32+
<!-- Add any other context about the refactoring proposal -->
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug Fix
3+
about: Submit a bug fix for NETCore.Keycloak
4+
title: '[BUGFIX] '
5+
labels: 'bug'
6+
---
7+
8+
## 🐛 Bug Description
9+
<!-- Link to the bug report issue and briefly describe the bug -->
10+
11+
## 🔧 Fix Description
12+
<!-- Describe your fix and how it addresses the issue -->
13+
14+
## 🔍 Root Cause
15+
<!-- Explain what caused the bug -->
16+
17+
## 🧪 Testing
18+
<!-- Describe how you tested the fix -->
19+
20+
## ✅ Regression Tests
21+
<!-- Describe the tests you've added to prevent regression -->
22+
23+
## 📋 Checklist
24+
- [ ] I have followed the code style guidelines
25+
- [ ] I have added regression tests
26+
- [ ] I have updated documentation if needed
27+
- [ ] I have added/updated XML documentation comments if needed
28+
- [ ] I have verified the fix in my local environment
29+
30+
## 📚 Additional Context
31+
<!-- Add any other context about the fix here -->
32+
33+
## 📸 Screenshots
34+
<!-- If applicable, add screenshots to show the fix -->
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Documentation Update
3+
about: Submit documentation changes for NETCore.Keycloak
4+
title: '[DOCS] '
5+
labels: 'documentation'
6+
---
7+
8+
## 📚 Documentation Changes
9+
<!-- Describe the documentation changes made -->
10+
11+
## 🔗 Related Issue
12+
<!-- Link to related documentation issue if applicable -->
13+
14+
## 📋 Type of Change
15+
<!-- What type of documentation change is this? -->
16+
- [ ] New documentation
17+
- [ ] Documentation update
18+
- [ ] Fix typos/errors
19+
- [ ] Improve clarity
20+
- [ ] Add examples
21+
- [ ] Other (please describe)
22+
23+
## ✅ Checklist
24+
- [ ] I have checked for technical accuracy
25+
- [ ] I have tested all code examples (if any)
26+
- [ ] I have checked for proper formatting
27+
- [ ] I have verified all links work
28+
- [ ] I have run spellcheck
29+
30+
## 🖼️ Preview
31+
<!-- If applicable, add screenshots or links to preview the changes -->
32+
33+
## 📝 Additional Notes
34+
<!-- Any additional information that reviewers should know -->
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Feature Implementation
3+
about: Submit a new feature to NETCore.Keycloak
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
---
7+
8+
## ✨ Feature Description
9+
<!-- Describe the feature you've implemented -->
10+
11+
## 🔗 Related Issue
12+
<!-- Link to the feature request issue -->
13+
14+
## 🛠️ Implementation Details
15+
<!-- Provide details about your implementation -->
16+
17+
## 🧪 Testing
18+
<!-- Describe the tests you've added -->
19+
20+
## 📚 Documentation
21+
<!-- List documentation changes made -->
22+
23+
## ⚠️ Breaking Changes
24+
<!-- List any breaking changes and migration steps -->
25+
26+
## ✅ Checklist
27+
- [ ] I have followed the code style guidelines
28+
- [ ] I have added unit tests
29+
- [ ] I have updated documentation
30+
- [ ] I have added XML documentation comments
31+
- [ ] I have tested the feature thoroughly
32+
- [ ] I have added example code (if applicable)
33+
34+
## 📸 Screenshots
35+
<!-- If applicable, add screenshots to showcase the feature -->
36+
37+
## 📝 Additional Notes
38+
<!-- Any additional information that reviewers should know -->
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Hotfix
3+
about: Submit an urgent fix for NETCore.Keycloak
4+
title: '[HOTFIX] '
5+
labels: 'hotfix'
6+
---
7+
8+
## 🚨 Emergency Description
9+
<!-- Describe the critical issue being fixed -->
10+
11+
## 💥 Impact
12+
<!-- Describe the impact of the issue on users -->
13+
14+
## 🔧 Fix Description
15+
<!-- Describe your emergency fix -->
16+
17+
## ⚠️ Risk Assessment
18+
<!-- Assess the risk of this hotfix -->
19+
20+
## 🧪 Testing
21+
<!-- Describe how you tested the fix -->
22+
23+
## ✅ Verification Steps
24+
<!-- Steps for reviewers to verify the fix -->
25+
26+
## 📋 Checklist
27+
- [ ] I have followed the code style guidelines
28+
- [ ] I have added tests
29+
- [ ] I have updated documentation if needed
30+
- [ ] I have tested in production-like environment
31+
- [ ] I have considered potential side effects
32+
33+
## 🔄 Rollback Plan
34+
<!-- Describe how to rollback this change if needed -->
35+
36+
## 📚 Additional Context
37+
<!-- Add any other context about the hotfix here -->

.github/workflows/branch_naming_policy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Branch naming policy check
2323
run: |
2424
echo "${{ steps.extract_branch.outputs.branch }}"
25-
[[ "${{ steps.extract_branch.outputs.branch }}" =~ ^[a-z0-9_]{5,50}$ ]] || exit 1
25+
[[ "${{ steps.extract_branch.outputs.branch }}" =~ ^(feature|bugfix|hotfix|docs|refactor)/[a-z0-9_]{5,50}$ ]] || exit 1
2626
2727
- name: Close pull request and delete branch
2828
if: failure()

CONTRIBUTING.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Contributing to NETCore.Keycloak
2+
3+
We love your input! We want to make contributing to NETCore.Keycloak as easy and transparent as possible, whether it's:
4+
5+
- Reporting a bug
6+
- Discussing the current state of the code
7+
- Submitting a fix
8+
- Proposing new features
9+
- Becoming a maintainer
10+
11+
## Development Process
12+
13+
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
14+
15+
### Branch Naming Convention
16+
17+
All branch names must follow this format:
18+
```
19+
(feature|bugfix|hotfix|docs|refactor)/[a-z0-9_]{5,50}
20+
```
21+
22+
This means:
23+
- Start with one of these prefixes: `feature/`, `bugfix/`, `hotfix/`, `docs/`, `refactor/`
24+
- Followed by a description that:
25+
- Is 5-50 characters long
26+
- Uses only lowercase letters (a-z), numbers (0-9), and underscores (_)
27+
- No spaces, hyphens, or special characters allowed
28+
29+
Examples:
30+
- `feature/add_token_refresh`
31+
- `bugfix/fix_auth_flow_123`
32+
- `hotfix/security_patch_456`
33+
- `docs/update_readme_789`
34+
- `refactor/simplify_code_101`
35+
36+
### Pull Request Process
37+
38+
1. Fork the repo and create your branch from `main` following the branch naming convention
39+
2. Ensure your code follows the existing code style and formatting rules defined in `.editorconfig`
40+
3. Update the documentation if needed
41+
4. Ensure all tests pass
42+
5. Create a Pull Request with a clear title and description
43+
44+
### Code Style Guidelines
45+
46+
We use `.editorconfig` to maintain consistent coding styles. Some key points:
47+
- Use tabs for indentation
48+
- Maximum line length is 120 characters
49+
- UTF-8 encoding
50+
- Trim trailing whitespace
51+
- Insert final newline
52+
- Follow C# naming conventions
53+
- Use proper spacing and bracing rules as defined in `.editorconfig`
54+
55+
#### Documentation Requirements
56+
- All public APIs must be documented using XML documentation comments
57+
- Documentation should follow the standard XML format:
58+
```csharp
59+
/// <summary>
60+
/// Brief description of what the method/class does
61+
/// </summary>
62+
/// <param name="parameterName">Description of the parameter</param>
63+
/// <returns>Description of the return value</returns>
64+
/// <exception cref="ExceptionType">When the exception is thrown</exception>
65+
```
66+
- Include code examples in documentation when the usage is not immediately obvious
67+
- Keep comments up to date with code changes
68+
- Use clear and concise language
69+
- Document non-obvious implementation details or business logic
70+
- Include references to related documentation or external resources when applicable
71+
72+
### Commit Message Guidelines
73+
74+
- Use the present tense ("Add feature" not "Added feature")
75+
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
76+
- Limit the first line to 72 characters or less
77+
- Reference issues and pull requests liberally after the first line
78+
79+
### Security
80+
81+
- Never commit sensitive information (API keys, credentials, etc.)
82+
- Follow SAST (Static Application Security Testing) rules defined in `.editorconfig`
83+
- Report security vulnerabilities privately to the maintainers
84+
85+
## License
86+
87+
By contributing, you agree that your contributions will be licensed under the same license as the project.
88+
89+
## Questions?
90+
91+
Don't hesitate to open an issue for any questions or concerns.

0 commit comments

Comments
 (0)