Skip to content

Latest commit

 

History

History
130 lines (94 loc) · 5.46 KB

CONTRIBUTING.md

File metadata and controls

130 lines (94 loc) · 5.46 KB

Contributing to stats.jenkins.io

Thank you for considering contributing to the stats.jenkins.io project! We welcome all kinds of contributions, whether it's reporting a bug, suggesting an enhancement, or submitting code. This guide will help you get started with contributing to the repository.

Table of Contents

  1. How to Contribute
  2. Getting Started
  3. Branching Strategy
  4. Commit Messages
  5. Code Style and Best Practices
  6. Issue Tracking
  7. Pull Request Process
  8. Running Tests
  9. Updating Documentation
  10. Code of Conduct
  11. Community and Communication

How to Contribute

You can contribute to stats.jenkins.io in several ways:

  • Reporting Bugs: If you find a bug, please report it by creating an issue.
  • Suggesting Enhancements: If you have an idea to improve the project, feel free to open an issue with your suggestion.
  • Submitting Code: If you're comfortable with coding, you can submit a pull request (PR) with bug fixes, features, or other improvements.
  • Improving Documentation: Documentation is key to a healthy project. You can contribute by updating existing docs or adding new ones.

Getting Started

Installation

  1. Fork the repository to your GitHub account.
  2. Clone your forked repository to your local machine:
    git clone https://github.com/your-username/stats.jenkins.io.git
  3. Navigate to the project directory:
    cd stats.jenkins.io
  4. Retrieve data from infra-statistics:
    ./retrieve-infra-statistics-data.sh
  5. Install dependencies:
    npm install
  6. Run the project locally:
    npm run dev

Your local instance of the project should now be up and running!

Branching Strategy

We follow a simple branching strategy:

  • main is the stable branch. All new features or bug fixes should be branched off from main and merged back into main after review.
  • Feature branches: For new features, create a branch named feature/your-feature-name.
  • Bugfix branches: For bug fixes, create a branch named bugfix/your-bugfix-name.

Commit Messages

Please write meaningful and descriptive commit messages. Follow this structure:

  • Type: A short description of the change.
  • Body: A detailed explanation of what was done and why (optional).
  • Footer: Reference to any issues fixed or relevant notes (optional).

Example:

feat: add new chart for plugin trends

Added a new echarts-based line chart to display plugin trends over time.

Code Style and Best Practices

  • Follow the existing coding style and conventions.
  • Use consistent indentation and formatting.
  • Write comments where necessary, especially for complex logic.
  • Avoid introducing unnecessary dependencies.

Issue Tracking

Pull Request Process

  1. Fork and clone the repository (if you haven’t already).
  2. Create a new branch for your changes:
    git checkout -b feature/your-feature-name
  3. Make your changes and commit them with a meaningful message.
  4. Push your changes to your fork:
    git push origin feature/your-feature-name
  5. Create a pull request from your fork’s branch to the main branch of the original repository.
  6. Participate in the review process: Be responsive to feedback and make necessary adjustments.
  7. Merge after approval: Once your PR is approved, it will be merged into main.

Running Tests

We have an automated testing pipeline integrated with Jenkins CI/CD that will automatically run a series of checks when you submit a pull request. Here are the key checks that will be performed:

  • Jenkins Build: Ensures that the code builds successfully and passes all tests.
  • Typos Check: Automatically checks for any spelling or typographical errors in the codebase.
  • Continuous Integration: Confirms that the changes in the commit are valid and can be merged.
  • PR Merge Validation: Validates that the commit can be successfully merged into the main branch.

These checks are performed by our Jenkins bots, such as ci-jenkins-io[bot] and infra-ci-jenkins-io[bot], which will provide detailed feedback on your pull request.

Updating Documentation

If you make changes to the code that affect the documentation, please update the relevant docs in the docs/ directory. This ensures that everything stays in sync and new contributors have accurate information.

Code of Conduct

This project follows the Jenkins Code of Conduct. By participating, you are expected to uphold this code. Please report any unacceptable behavior to the project maintainers.

Community and Communication

If you have questions or need help, the Jenkins community offers several channels for communication. For more detailed information on how to connect with the Jenkins community, please visit the following page:

Participate and Connect - Jenkins Community