Skip to content

Commit a29e74e

Browse files
committed
Add GitHub contribution and issue templates
Introduced CONTRIBUTING.md, bug report and feature request issue templates, and a pull request template to standardize contributions, issue reporting, and PR submissions. These additions aim to improve project collaboration, clarify contribution guidelines, and streamline the review process.
1 parent 08a1f4d commit a29e74e

File tree

4 files changed

+390
-0
lines changed

4 files changed

+390
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# Contributing to go-githubauth
2+
3+
First off, thanks for taking the time to contribute! 🎉
4+
5+
The following is a set of guidelines for contributing to go-githubauth. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
6+
7+
## Code of Conduct
8+
9+
This project and everyone participating in it is governed by our commitment to creating a welcoming and inclusive environment. Please be respectful and professional in all interactions.
10+
11+
## How Can I Contribute?
12+
13+
### Reporting Bugs
14+
15+
Before creating bug reports, please check the [existing issues](https://github.com/jferrl/go-githubauth/issues) as you might find that the problem has already been reported.
16+
17+
When you are creating a bug report, please include as many details as possible:
18+
19+
- Use the bug report template
20+
- Include the version of go-githubauth you're using
21+
- Include your Go version
22+
- Provide a clear description of the problem
23+
- Include code examples if applicable
24+
25+
### Suggesting Enhancements
26+
27+
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
28+
29+
- Use the feature request template
30+
- Provide a clear and detailed explanation of the feature
31+
- Include examples of how the feature would be used
32+
- Consider whether this feature would be useful to most users
33+
34+
### Pull Requests
35+
36+
1. Fork the repository and create your branch from `main`
37+
2. Make your changes
38+
3. Add tests if applicable
39+
4. Ensure the test suite passes
40+
5. Update documentation if needed
41+
6. Create a pull request using the provided template
42+
43+
## Development Setup
44+
45+
### Prerequisites
46+
47+
- Go 1.21 or later
48+
- Git
49+
50+
### Setting Up Your Development Environment
51+
52+
1. Fork the repository on GitHub
53+
2. Clone your fork locally:
54+
```bash
55+
git clone https://github.com/YOUR-USERNAME/go-githubauth.git
56+
cd go-githubauth
57+
```
58+
3. Install dependencies:
59+
```bash
60+
go mod download
61+
```
62+
63+
### Running Tests
64+
65+
```bash
66+
# Run all tests
67+
go test ./...
68+
69+
# Run tests with coverage
70+
go test -race -coverprofile=coverage.out -covermode=atomic ./...
71+
72+
# View coverage report
73+
go tool cover -html=coverage.out
74+
```
75+
76+
### Code Style
77+
78+
- Follow standard Go formatting (`gofmt`)
79+
- Use `go vet` to check for common mistakes
80+
- Follow Go naming conventions
81+
- Write clear, self-documenting code
82+
- Add comments for complex logic
83+
- Keep functions focused and small
84+
85+
### Documentation
86+
87+
- Update the README.md if you change functionality
88+
- Add godoc comments to exported functions and types
89+
- Update CHANGELOG.md following the existing format
90+
- Keep documentation concise but comprehensive
91+
92+
## Git Workflow
93+
94+
1. Create a feature branch:
95+
```bash
96+
git checkout -b feature/your-feature-name
97+
```
98+
99+
2. Make your changes and commit them:
100+
```bash
101+
git add .
102+
git commit -m "Add your descriptive commit message"
103+
```
104+
105+
3. Push to your fork:
106+
```bash
107+
git push origin feature/your-feature-name
108+
```
109+
110+
4. Create a Pull Request on GitHub
111+
112+
### Commit Messages
113+
114+
Use Conventional Commits to format your commit messages. This will help us generate a changelog and release notes. See [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for more details.
115+
116+
Examples:
117+
118+
```
119+
feat: Add support for GitHub Enterprise Server
120+
fix: JWT token expiration validation
121+
chore: update dependencies to latest versions
122+
docs: improve installation instructions
123+
```
124+
125+
## Testing
126+
127+
- Write tests for new functionality
128+
- Ensure existing tests pass
129+
- Aim for good test coverage
130+
- Test both success and error cases
131+
- Use table-driven tests for multiple scenarios
132+
133+
## Documentation Guidelines
134+
135+
- Write clear, concise documentation
136+
- Include code examples for new features
137+
- Update existing examples if APIs change
138+
- Follow godoc conventions for comments
139+
140+
## Release Process
141+
142+
This section is primarily for maintainers:
143+
144+
1. Update CHANGELOG.md with new version
145+
2. Update version references in documentation
146+
3. Create a new release on GitHub
147+
4. Verify the release works correctly
148+
149+
## Getting Help
150+
151+
- Check the [documentation](https://pkg.go.dev/github.com/jferrl/go-githubauth)
152+
- Look at [existing issues](https://github.com/jferrl/go-githubauth/issues)
153+
- Create a new issue if your question isn't answered
154+
155+
## Recognition
156+
157+
Contributors will be acknowledged in the CHANGELOG.md file and may be invited to become maintainers based on their contributions.
158+
159+
Thank you for contributing to go-githubauth! 🚀
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: 🐛 Bug Report
2+
description: File a bug report to help us improve
3+
title: "[Bug]: "
4+
labels: ["bug", "needs-triage"]
5+
assignees:
6+
- jferrl
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to fill out this bug report!
12+
13+
- type: input
14+
id: version
15+
attributes:
16+
label: go-githubauth Version
17+
description: What version of go-githubauth are you running?
18+
placeholder: v1.3.0
19+
validations:
20+
required: true
21+
22+
- type: input
23+
id: go-version
24+
attributes:
25+
label: Go Version
26+
description: What version of Go are you using?
27+
placeholder: go version go1.21.5 darwin/arm64
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: what-happened
33+
attributes:
34+
label: What happened?
35+
description: A clear and concise description of what the bug is.
36+
placeholder: Tell us what you see!
37+
validations:
38+
required: true
39+
40+
- type: textarea
41+
id: expected
42+
attributes:
43+
label: Expected behavior
44+
description: A clear and concise description of what you expected to happen.
45+
placeholder: What should have happened instead?
46+
validations:
47+
required: true
48+
49+
- type: textarea
50+
id: reproduce
51+
attributes:
52+
label: Steps to reproduce
53+
description: Steps to reproduce the behavior
54+
placeholder: |
55+
1. Go to '...'
56+
2. Click on '....'
57+
3. Scroll down to '....'
58+
4. See error
59+
validations:
60+
required: true
61+
62+
- type: textarea
63+
id: code
64+
attributes:
65+
label: Code example
66+
description: If applicable, add code examples to help explain your problem.
67+
render: go
68+
placeholder: |
69+
package main
70+
71+
import "github.com/jferrl/go-githubauth"
72+
73+
func main() {
74+
// Your code here
75+
}
76+
77+
- type: textarea
78+
id: logs
79+
attributes:
80+
label: Relevant log output
81+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
82+
render: shell
83+
84+
- type: textarea
85+
id: additional
86+
attributes:
87+
label: Additional context
88+
description: Add any other context about the problem here.
89+
placeholder: Any additional information that might help us understand the issue.
90+
91+
- type: checkboxes
92+
id: terms
93+
attributes:
94+
label: Code of Conduct
95+
description: By submitting this issue, you agree to follow our Code of Conduct
96+
options:
97+
- label: I agree to follow this project's Code of Conduct
98+
required: true
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: 🚀 Feature Request
2+
description: Suggest an idea for this project
3+
title: "[Feature]: "
4+
labels: ["enhancement", "needs-triage"]
5+
assignees:
6+
- jferrl
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to suggest a new feature!
12+
13+
- type: textarea
14+
id: problem
15+
attributes:
16+
label: Is your feature request related to a problem?
17+
description: A clear and concise description of what the problem is.
18+
placeholder: I'm always frustrated when [...]
19+
validations:
20+
required: false
21+
22+
- type: textarea
23+
id: solution
24+
attributes:
25+
label: Describe the solution you'd like
26+
description: A clear and concise description of what you want to happen.
27+
placeholder: I would like to see [...]
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: alternatives
33+
attributes:
34+
label: Describe alternatives you've considered
35+
description: A clear and concise description of any alternative solutions or features you've considered.
36+
placeholder: Alternatives I've considered include [...]
37+
validations:
38+
required: false
39+
40+
- type: textarea
41+
id: use-case
42+
attributes:
43+
label: Use case
44+
description: Describe your use case and how this feature would benefit you and other users.
45+
placeholder: This feature would help me [...]
46+
validations:
47+
required: true
48+
49+
- type: textarea
50+
id: implementation
51+
attributes:
52+
label: Implementation ideas
53+
description: If you have ideas on how to implement this feature, please share them.
54+
placeholder: This could be implemented by [...]
55+
validations:
56+
required: false
57+
58+
- type: textarea
59+
id: code-example
60+
attributes:
61+
label: Code example
62+
description: If applicable, provide a code example of how you envision the feature working.
63+
render: go
64+
placeholder: |
65+
package main
66+
67+
import "github.com/jferrl/go-githubauth"
68+
69+
func main() {
70+
// Example usage of new feature
71+
}
72+
73+
- type: textarea
74+
id: additional
75+
attributes:
76+
label: Additional context
77+
description: Add any other context or screenshots about the feature request here.
78+
placeholder: Any additional information that might help us understand the request.
79+
80+
- type: checkboxes
81+
id: terms
82+
attributes:
83+
label: Code of Conduct
84+
description: By submitting this issue, you agree to follow our Code of Conduct
85+
options:
86+
- label: I agree to follow this project's Code of Conduct
87+
required: true

.github/pull_request_template.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## Description
2+
3+
Briefly describe the changes in this PR. What problem does it solve or what feature does it add?
4+
5+
## Type of Change
6+
7+
Please delete options that are not relevant.
8+
9+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
10+
- [ ] ✨ New feature (non-breaking change which adds functionality)
11+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
12+
- [ ] 📚 Documentation update
13+
- [ ] 🎨 Code style/refactoring (no functional changes)
14+
- [ ] 🔧 Chore (dependency updates, tooling, etc.)
15+
16+
## Testing
17+
18+
- [ ] I have added tests that prove my fix is effective or that my feature works
19+
- [ ] New and existing unit tests pass locally with my changes
20+
- [ ] I have tested this change manually
21+
22+
## Documentation
23+
24+
- [ ] I have updated the documentation accordingly
25+
- [ ] I have updated the CHANGELOG.md file
26+
- [ ] I have added/updated code comments where necessary
27+
28+
## Checklist
29+
30+
- [ ] My code follows the style guidelines of this project
31+
- [ ] I have performed a self-review of my own code
32+
- [ ] My changes generate no new warnings
33+
- [ ] I have checked my code and corrected any misspellings
34+
- [ ] My changes are compatible with the supported Go versions (1.21+)
35+
36+
## Screenshots (if applicable)
37+
38+
If your changes include visual elements, please add screenshots here.
39+
40+
## Related Issues
41+
42+
Closes #(issue number)
43+
44+
## Additional Notes
45+
46+
Add any other context about the pull request here.

0 commit comments

Comments
 (0)