-
Notifications
You must be signed in to change notification settings - Fork 3
docs(pr-rules): Add guidelines for Pull Request title formatting and types #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| # Pull Request (PR) Rules - The Herald Bot | ||
|
|
||
| ## Introduction | ||
|
|
||
| The **DevSec Blueprint (DSB)** community is dedicated to educating members about **DevSecOps** principles, tools, and best practices. As part of our commitment to maintaining high-quality software development, **The Herald** Discord bot follows structured **Pull Request (PR) guidelines** to ensure clarity, maintainability, and consistency across contributions. | ||
|
|
||
| This document outlines the **Conventional Commits** specification for PR titles, ensuring that contributions align with **best DevSecOps practices**, facilitate automated release generation, and maintain a structured commit history. | ||
|
|
||
| --- | ||
|
|
||
| ## PR Title Formatting | ||
|
|
||
| Every **non-draft PR** must follow the **Conventional Commits** specification for PR titles. This ensures: | ||
|
|
||
| - **Consistent and readable commit history** | ||
| - **Automatic generation of release notes** | ||
| - **Avoidance of merge conflicts in release documentation** | ||
|
|
||
| ### PR Title Format | ||
|
|
||
| A PR title should follow this structure: | ||
|
|
||
| ``` | ||
| <type>([optional scope]): <description> | ||
| ``` | ||
|
|
||
| Where: | ||
|
|
||
| - **`<type>`** – Defines the nature of the change (see **Types** below) | ||
| - **`[optional scope]`** – Provides additional context (optional but recommended) | ||
| - **`<description>`** – Brief and meaningful description of the change | ||
|
|
||
| --- | ||
|
|
||
| ## PR Types | ||
|
|
||
| Each PR must fall under one of the following types: | ||
|
|
||
| | Type | Description | | ||
| | ------------ | ------------------------------------------------------------------------------------------ | | ||
| | **feat** | Introduces a new feature for The Herald bot | | ||
| | **fix** | Resolves a bug or issue in the bot’s code | | ||
| | **chore** | Non-code changes, such as documentation updates, manual release notes, or repo maintenance | | ||
| | **docs** | Updates to documentation, including README or wiki pages | | ||
| | **build** | Changes to build scripts or dependency updates | | ||
| | **ci** | Modifications to CI/CD pipelines, such as GitHub Actions | | ||
| | **refactor** | Code refactoring without functional changes | | ||
| | **style** | Formatting, whitespace, or stylistic changes that don’t alter logic | | ||
| | **test** | Adding or updating tests | | ||
| | **perf** | Performance improvements (unlikely to be common for The Herald) | | ||
|
|
||
| --- | ||
|
|
||
| ## Examples | ||
|
|
||
| | PR Title | Description | | ||
| | --------------------------------------------------------------------- | ------------------------------------------------------------- | | ||
| | `feat(bot): Add role-based access control` | Introduces role-based access control (RBAC) to The Herald bot | | ||
| | `fix(auth): Resolve incorrect token expiration handling` | Fixes a bug where tokens were expiring prematurely | | ||
| | `ci(workflows): Update deployment pipeline to include security scans` | Enhances CI/CD pipeline with security checks | | ||
| | `docs(readme): Add setup guide for contributors` | Improves documentation for new contributors | | ||
| | `test(commands): Add unit tests for moderation commands` | Adds missing tests for bot moderation features | | ||
| | `chore: Release v1.2.0` | Manual release note update for version 1.2.0 | | ||
|
|
||
| --- | ||
|
|
||
| ## Additional Guidelines | ||
|
|
||
| - **Scope (optional but encouraged):** Use it when it provides meaningful context (e.g., `feat(bot): ...` instead of just `feat: ...`). | ||
| - **Keep descriptions clear and concise:** Avoid unnecessary details in the title; add further context in the PR description. | ||
| - **Follow best security practices:** Any security-related PRs should be labeled accordingly and reviewed carefully before merging. | ||
|
|
||
| --- | ||
|
|
||
| ## Why This Matters | ||
|
|
||
| By following this **PR title convention**, contributors to **The Herald** help: | ||
|
|
||
| ✅ Maintain a **structured and meaningful commit history** | ||
| ✅ Enable **automated changelogs** and **release note generation** | ||
| ✅ Improve **code review efficiency** for the **DSB** community | ||
|
|
||
| Thank you for contributing to **The Herald** and supporting **DevSecOps education!** 🚀 | ||
|
|
||
| --- | ||
|
|
||
| Would you like any modifications or additional details included? | ||
damienjburks marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This question is for you Damien. I wasn't sure if I captured everything or if the style matched what you were envisioning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope! This is PERFECT ❤️