2025-05-11 22:42:27 +05:30
|
|
|
|
|
|
|
|
# Contributing Guide
|
|
|
|
|
|
|
|
|
|
You can contribute to `pmg` and help make it better. Apart from bug fixes,
|
|
|
|
|
features, we particularly value contributions in the form of:
|
|
|
|
|
|
|
|
|
|
- Documentation improvements
|
|
|
|
|
- Bug reports
|
|
|
|
|
- Using `pmg` in your projects and providing feedback
|
|
|
|
|
|
|
|
|
|
## How to contribute
|
|
|
|
|
|
|
|
|
|
1. Fork the repository
|
|
|
|
|
2. Add your changes
|
|
|
|
|
3. Submit a pull request
|
|
|
|
|
|
|
|
|
|
## How to report a bug
|
|
|
|
|
|
2025-05-15 18:03:46 +05:30
|
|
|
Create a new issue and add the label `bug`.
|
2025-05-11 22:42:27 +05:30
|
|
|
|
|
|
|
|
## How to suggest a new feature
|
|
|
|
|
|
2025-05-15 18:03:46 +05:30
|
|
|
Create a new issue and add the label `enhancement`.
|
2025-05-11 22:42:27 +05:30
|
|
|
|
|
|
|
|
## Development workflow
|
|
|
|
|
|
|
|
|
|
When contributing changes to repository, follow these steps:
|
|
|
|
|
|
|
|
|
|
1. Ensure tests are passing
|
|
|
|
|
2. Ensure you write test cases for new code
|
|
|
|
|
3. `Signed-off-by` line is required in commit message (use `-s` flag while committing)
|
|
|
|
|
|
|
|
|
|
## Developer Setup
|
|
|
|
|
|
|
|
|
|
### Requirements
|
|
|
|
|
|
|
|
|
|
- Go 1.24+
|
|
|
|
|
- Git
|
|
|
|
|
- Make
|
|
|
|
|
|
|
|
|
|
### Getting Started
|
|
|
|
|
|
|
|
|
|
1. Clone your fork:
|
2025-05-15 18:03:46 +05:30
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
git clone https://github.com/YOUR_USERNAME/pmg.git
|
|
|
|
|
cd pmg
|
|
|
|
|
```
|
2025-05-11 22:42:27 +05:30
|
|
|
|
|
|
|
|
2. Install dependencies:
|
2025-05-15 18:03:46 +05:30
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
go mod tidy
|
|
|
|
|
```
|
2025-05-11 22:42:27 +05:30
|
|
|
|
|
|
|
|
3. Build the project:
|
2025-05-15 18:03:46 +05:30
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
make all
|
|
|
|
|
```
|
2025-05-11 22:42:27 +05:30
|
|
|
|
|
|
|
|
### Development Workflow
|
|
|
|
|
|
|
|
|
|
1. Create a branch:
|
2025-05-15 18:03:46 +05:30
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
git checkout -b feature/your-feature
|
|
|
|
|
```
|
2025-05-11 22:42:27 +05:30
|
|
|
|
|
|
|
|
2. Make your changes and test:
|
2025-05-15 18:03:46 +05:30
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
make test
|
|
|
|
|
```
|
2025-05-11 22:42:27 +05:30
|
|
|
|
|
|
|
|
3. Commit with sign-off:
|
2025-05-15 18:03:46 +05:30
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
git commit -s -m "feat: add new feature"
|
|
|
|
|
```
|
2025-05-11 22:42:27 +05:30
|
|
|
|
|
|
|
|
4. Push and create PR:
|
2025-05-15 18:03:46 +05:30
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
git push origin feature/your-feature
|
|
|
|
|
```
|