Skip to content

Commit 805594a

Browse files
authored
docs: Add the various GH doc files (#226)
* docs: Add the various GH doc files * docs: Add githook to check for commit prefixes
1 parent 8006775 commit 805594a

9 files changed

Lines changed: 412 additions & 0 deletions

File tree

.githooks/commit-msg

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/sh
2+
#
3+
# Git hook to validate commit messages follow Conventional Commits format.
4+
# https://www.conventionalcommits.org/
5+
#
6+
# To enable this hook, run:
7+
# git config core.hooksPath .githooks
8+
#
9+
10+
commit_msg_file="$1"
11+
commit_msg=$(cat "$commit_msg_file")
12+
13+
# Skip merge commits
14+
if echo "$commit_msg" | grep -qE "^Merge "; then
15+
exit 0
16+
fi
17+
18+
# Conventional commit pattern: type(optional scope): description
19+
# Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert, deps
20+
pattern="^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert|deps)(\(.+\))?: .+"
21+
22+
if ! echo "$commit_msg" | head -1 | grep -qE "$pattern"; then
23+
echo ""
24+
echo "ERROR: Commit message does not follow Conventional Commits format."
25+
echo ""
26+
echo "Expected format: <type>: <description>"
27+
echo " <type>(<scope>): <description>"
28+
echo ""
29+
echo "Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert, deps"
30+
echo ""
31+
echo "Examples:"
32+
echo " feat: add new subscriber type"
33+
echo " fix: resolve validation error"
34+
echo " docs: update README"
35+
echo " chore(deps): update dependencies"
36+
echo ""
37+
echo "Note: There must be a space after the colon."
38+
echo ""
39+
echo "Your commit message was:"
40+
echo " $(head -1 "$commit_msg_file")"
41+
echo ""
42+
exit 1
43+
fi
44+
45+
exit 0

.github/CONTRIBUTING.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Contributing to Azure Event Grid Simulator
2+
3+
Thank you for your interest in contributing to Azure Event Grid Simulator! This document provides guidelines and information for contributors.
4+
5+
> **Note:** This simulator is intended for **local development and testing only**. When contributing, keep in mind that features should support local development scenarios, not production use cases.
6+
7+
## Getting Started
8+
9+
### Prerequisites
10+
11+
- .NET 10.0 SDK (required by global.json to build)
12+
- Git
13+
- Your favorite IDE (Visual Studio, VS Code, Rider, etc.)
14+
15+
> **Note:** While .NET 10.0 SDK is required to build, the project multi-targets .NET 8.0, 9.0, and 10.0 to support users on any of these runtimes.
16+
17+
### Setting Up the Development Environment
18+
19+
1. Fork the repository
20+
2. Clone your fork:
21+
```bash
22+
git clone https://github.com/YOUR_USERNAME/AzureEventGridSimulator.git
23+
cd AzureEventGridSimulator
24+
```
25+
3. Restore dependencies:
26+
```bash
27+
dotnet restore src/AzureEventGridSimulator.sln
28+
```
29+
4. Build the project:
30+
```bash
31+
dotnet build src/AzureEventGridSimulator.sln
32+
```
33+
5. Run tests:
34+
```bash
35+
dotnet test src/AzureEventGridSimulator.sln
36+
```
37+
Git hooks are configured automatically on first build to validate commit messages follow conventional commit format.
38+
39+
## Code Style
40+
41+
This project uses [CSharpier](https://csharpier.com/) for code formatting. CSharpier runs automatically on every build, so your code will be formatted before compilation.
42+
43+
To manually format the code:
44+
```bash
45+
dotnet tool restore
46+
dotnet csharpier format src
47+
```
48+
49+
## Making Changes
50+
51+
### Branch Naming
52+
53+
Create a descriptive branch name for your changes:
54+
- `feature/add-new-subscriber-type`
55+
- `fix/validation-error-handling`
56+
- `docs/update-readme`
57+
58+
### Commit Messages
59+
60+
This project uses [Conventional Commits](https://www.conventionalcommits.org/). Please format your commit messages as:
61+
62+
- `feat:` - A new feature
63+
- `fix:` - A bug fix
64+
- `docs:` - Documentation changes
65+
- `chore:` - Maintenance tasks
66+
- `refactor:` - Code refactoring
67+
- `test:` - Adding or updating tests
68+
69+
Example: `feat: add Azure Storage Queue subscriber support`
70+
71+
### Pull Requests
72+
73+
1. Ensure your code builds without errors
74+
2. Ensure all tests pass
75+
3. Update documentation if needed
76+
4. Fill out the pull request template
77+
5. Link any related issues
78+
79+
## Testing
80+
81+
- Write tests for new functionality
82+
- Ensure existing tests pass before submitting a PR
83+
- Run the full test suite:
84+
```bash
85+
dotnet test src/AzureEventGridSimulator.sln
86+
```
87+
88+
## Reporting Issues
89+
90+
- Use the GitHub issue templates for bug reports and feature requests
91+
- Search existing issues before creating a new one
92+
- Provide as much detail as possible
93+
94+
## Code of Conduct
95+
96+
This project follows the [Contributor Covenant Code of Conduct](../CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
97+
98+
## Questions?
99+
100+
If you have questions, feel free to open a discussion or issue on GitHub.
101+
102+
## License
103+
104+
By contributing, you agree that your contributions will be licensed under the MIT License.
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for taking the time to report a bug! Please fill out the information below to help us investigate.
10+
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: Bug Description
15+
description: A clear and concise description of what the bug is.
16+
placeholder: Describe the bug...
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: reproduction
22+
attributes:
23+
label: Steps to Reproduce
24+
description: Steps to reproduce the behavior.
25+
placeholder: |
26+
1. Configure topic with...
27+
2. Send event to...
28+
3. See error...
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: expected
34+
attributes:
35+
label: Expected Behavior
36+
description: What you expected to happen.
37+
validations:
38+
required: true
39+
40+
- type: textarea
41+
id: actual
42+
attributes:
43+
label: Actual Behavior
44+
description: What actually happened.
45+
validations:
46+
required: true
47+
48+
- type: dropdown
49+
id: version
50+
attributes:
51+
label: Version
52+
description: What version of Azure Event Grid Simulator are you using?
53+
options:
54+
- Latest (from source)
55+
- 4.x
56+
- 3.x
57+
- 2.x
58+
- Other (please specify in description)
59+
validations:
60+
required: true
61+
62+
- type: dropdown
63+
id: installation
64+
attributes:
65+
label: Installation Method
66+
description: How did you install the simulator?
67+
options:
68+
- .NET Tool (global)
69+
- .NET Tool (local)
70+
- Docker
71+
- Binary Release
72+
- Built from source
73+
validations:
74+
required: true
75+
76+
- type: dropdown
77+
id: os
78+
attributes:
79+
label: Operating System
80+
options:
81+
- Windows
82+
- macOS
83+
- Linux
84+
- Docker
85+
validations:
86+
required: true
87+
88+
- type: input
89+
id: dotnet-version
90+
attributes:
91+
label: .NET Version
92+
description: Output of `dotnet --version`
93+
placeholder: "8.0.100"
94+
95+
- type: textarea
96+
id: config
97+
attributes:
98+
label: Configuration
99+
description: Please paste your appsettings.json (remove any sensitive keys)
100+
render: json
101+
102+
- type: textarea
103+
id: logs
104+
attributes:
105+
label: Logs
106+
description: Any relevant log output or error messages
107+
render: shell
108+
109+
- type: textarea
110+
id: additional
111+
attributes:
112+
label: Additional Context
113+
description: Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Documentation
4+
url: https://github.com/pmcilreavy/AzureEventGridSimulator#readme
5+
about: Check the README for documentation and examples
6+
- name: Discussions
7+
url: https://github.com/pmcilreavy/AzureEventGridSimulator/discussions
8+
about: Ask questions and discuss ideas
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
title: "[Feature]: "
4+
labels: ["enhancement", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for suggesting a feature! Please provide as much detail as possible.
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: 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: It would be great if...
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+
35+
- type: dropdown
36+
id: category
37+
attributes:
38+
label: Feature Category
39+
description: What area does this feature relate to?
40+
options:
41+
- New subscriber type
42+
- Event schema support
43+
- Configuration
44+
- Docker/Deployment
45+
- Performance
46+
- Documentation
47+
- Other
48+
validations:
49+
required: true
50+
51+
- type: textarea
52+
id: use-case
53+
attributes:
54+
label: Use Case
55+
description: Describe the use case or scenario where this feature would be helpful.
56+
57+
- type: checkboxes
58+
id: contribution
59+
attributes:
60+
label: Contribution
61+
description: Would you be interested in contributing this feature?
62+
options:
63+
- label: I would be willing to submit a PR for this feature

.github/SECURITY.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Security Policy
2+
3+
> **Important:** Azure Event Grid Simulator is intended for **local development and testing only**. It should **never** be used in production environments. For production workloads, use the official [Azure Event Grid](https://azure.microsoft.com/en-au/services/event-grid/) service.
4+
5+
## Supported Versions
6+
7+
The following versions of Azure Event Grid Simulator are currently supported with security updates:
8+
9+
| Version | Supported |
10+
| ------- | ------------------ |
11+
| 4.x | :white_check_mark: |
12+
| < 4.0 | :x: |
13+
14+
## Reporting a Vulnerability
15+
16+
We take security vulnerabilities seriously. If you discover a security issue, please report it responsibly.
17+
18+
**Please do NOT report security vulnerabilities through public GitHub issues.**
19+
20+
Instead, please report them using GitHub's private vulnerability reporting feature:
21+
22+
1. Go to the [Security tab](https://github.com/pmcilreavy/AzureEventGridSimulator/security) of this repository
23+
2. Click "Report a vulnerability"
24+
3. Fill in the details of the vulnerability
25+
26+
### What to include in your report
27+
28+
- A description of the vulnerability
29+
- Steps to reproduce the issue
30+
- Potential impact of the vulnerability
31+
- Any suggested fixes (optional)
32+
33+
### What to expect
34+
35+
- You will receive an acknowledgment within 48 hours
36+
- We will investigate and provide updates on the progress
37+
- Once the issue is resolved, we will publicly acknowledge your contribution (unless you prefer to remain anonymous)
38+
39+
## Security Best Practices
40+
41+
When using Azure Event Grid Simulator for local development:
42+
43+
- Keep your `aeg-sas-key` values secure and do not commit them to source control
44+
- Use environment variables for sensitive configuration
45+
- Do not expose the simulator to the public internet
46+
- Use the official Azure Event Grid service for any production or internet-facing scenarios

0 commit comments

Comments
 (0)