Skip to content

🙌 Postar Open Source Contributing Guide

Thank you for your interest in this project! We welcome all forms of contribution, including reporting issues, submitting bug fixes, proposing new features, and more. To ensure the healthy development of the project, please read and follow the guidelines below before contributing.

Table of Contents

  1. Getting Started
  2. Reporting Issues
  3. Submitting Code
  4. Testing
  5. Code Review
  6. License

Getting Started

  1. Clone the project locally:

    bash
    git clone https://github.com/gitcoffee-os/postar.git
  2. Install dependencies
    Install the required dependencies based on the project's needs. You can usually find installation instructions in the project's README file.

  3. Create a new branch
    Before starting work, make sure to pull the latest code from the main or master branch and create a new branch for the issue or feature you want to work on:

    bash
    git checkout -b <feature-branch-name>

Reporting Issues

If you find a problem or have a suggestion, please follow these steps to report it:

  1. Create a new issue on the Issues page on GitHub.
  2. Describe the issue in detail, including reproduction steps, error messages, screenshots, and any other information that might help resolve the issue.

Submitting Code

Branch Management

When making any changes, always create a new branch from the latest main or master branch and commit your work to that branch.

Commit Message Convention

We follow the Conventional Commits specification for commit message formatting. Ensure each commit message is concise and follows this format:

<type>(<scope>): <description>

Examples:

feat(publisher): add Medium platform publishing support
fix(content): fix missing images during content extraction
docs: update API usage examples in documentation

Common types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation only
  • style: Code formatting (no functional changes)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Miscellaneous (e.g., build process or dependency management)

Code Style

This project uses Prettier and ESLint to enforce code style. Before submitting code, make sure it has been auto-formatted and passes static checks. If you don't have these tools installed, follow these steps:

  1. Install dependencies:

    bash
    pnpm i
  2. Run code formatting:

    bash
    pnpm run format
    pnpm run format:check

Testing

We encourage writing tests to ensure code quality and prevent regressions. Before submitting code, make sure all tests pass.

  1. Add tests
    If your changes involve a feature or bug fix, add new unit tests for that part and ensure the tests cover all relevant scenarios.

  2. Run tests
    Run the project's test suite to ensure all tests pass.

    bash
    pnpm test

Code Review

Every submission goes through Pull Request (PR) review. We welcome anyone to participate in the review process. When reviewing, please follow these points:

  1. Check functionality: Ensure the code solves the problem or implements the intended feature.
  2. Check code quality: Ensure the code is easy to read and understand, and follows the project's coding standards.
  3. Check test coverage: Ensure that feature changes haven't caused test failures; write new tests if necessary.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.


Thank you for contributing to this project! If you have any questions or suggestions, please feel free to ask — we'll do our best to help.