Skip to content
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

chore: Add GitHub pull request and issue templates. #1

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

kirkrodrigues
Copy link
Member

@kirkrodrigues kirkrodrigues commented Oct 29, 2024

Description

This adds GH templates for pull requests and issues (bug reports and features). This is largely a copy of our GH templates in other repos like https://github.com/y-scope/clp.

Note that this repo is meant to follow Conventional Commits.

Summary by CodeRabbit

  • New Features

    • Introduced a structured bug report template to improve issue reporting.
    • Added a feature request template for users to suggest enhancements.
    • Implemented a new pull request template to standardize submissions.
  • Chores

    • Enabled the option for users to create blank issues in the repository.

Copy link

coderabbitai bot commented Oct 29, 2024

Walkthrough

The pull request introduces several new templates for issue and pull request reporting in the GitHub repository. A bug report template is added to facilitate structured bug submissions, while a feature request template allows users to propose enhancements. Additionally, a pull request template standardizes the information contributors provide. The configuration file is updated to enable blank issues, offering users the flexibility to submit issues without predefined templates.

Changes

File Change Summary
.github/ISSUE_TEMPLATE/bug-report.yaml New issue template for bug reporting with structured fields for description, version, environment, and reproduction steps.
.github/ISSUE_TEMPLATE/config.yaml Added configuration option to enable blank issues (blank_issues_enabled: true).
.github/ISSUE_TEMPLATE/feature-request.yaml New feature request template with sections for request description and possible implementation suggestions.
.github/PULL_REQUEST_TEMPLATE.md New pull request template to standardize submissions, including sections for title, description, and validation details.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHub
    participant Repository

    User->>GitHub: Submit Bug Report
    GitHub->>Repository: Create Issue with Bug Template
    Repository-->>GitHub: Store Issue Details

    User->>GitHub: Submit Feature Request
    GitHub->>Repository: Create Issue with Feature Request Template
    Repository-->>GitHub: Store Feature Request Details

    User->>GitHub: Submit Pull Request
    GitHub->>Repository: Create Pull Request with Template
    Repository-->>GitHub: Store Pull Request Details
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (6)
.github/ISSUE_TEMPLATE/feature-request.yaml (3)

5-8: Consider enhancing the instructions for better clarity.

While the current instructions are functional, they could be more detailed to help users provide better feature requests.

Consider expanding the instructions with this diff:

-      value: "Use this form to request a feature/change in the software, or the project as a whole."
+      value: |
+        Use this form to request a feature/change in the software or the project as a whole.
+        
+        Please ensure your request:
+        - Is not already implemented or requested
+        - Aligns with the project's goals
+        - Includes clear benefits and use cases

9-15: Consider adding placeholders to guide user input.

The "Request" field could benefit from placeholder text to guide users in providing more structured responses.

Add placeholder text with this diff:

     attributes:
       label: "Request"
       description: "Describe your request and why it's important."
+      placeholder: |
+        What problem does this solve?
+        Who would benefit from this feature?
+        How does this align with the project's goals?
     validations:
       required: true

16-21: Consider adding technical context guidance.

The implementation field could benefit from guidance about technical considerations.

Add technical context with this diff:

     attributes:
       label: "Possible implementation"
       description: "Describe any implementations you have in mind."
+      description: "Describe any implementations you have in mind, including technical considerations and potential challenges."
+      placeholder: |
+        - Technical approach
+        - Potential challenges
+        - Alternative solutions considered
     validations:
       required: false
.github/ISSUE_TEMPLATE/bug-report.yaml (3)

13-18: Add a template structure for the bug description.

Consider providing a template structure in the placeholder to guide users in providing complete information.

       label: "Bug"
       description: "Describe what's wrong and if applicable, what you expected instead."
+      placeholder: |
+        ### Current Behaviour
+        (What actually happens)
+
+        ### Expected Behaviour
+        (What you expected to happen)
+
+        ### Impact
+        (How this bug affects your usage of the library)
     validations:
       required: true

28-34: Structure the environment information collection.

Consider providing a template in the placeholder to ensure all relevant environment details are captured consistently.

       label: "Environment"
       description: "The environment in which you're running the appenders."
-      placeholder: "Log4j 2 version, OS version, Docker version, etc."
+      placeholder: |
+        - Log4j 2 Version:
+        - Java Version:
+        - Operating System & Version:
+        - Deployment Environment (bare metal/container):
+        - Container Runtime & Version (if applicable):
+        - Cloud Provider & Service (if applicable):
     validations:
       required: true

36-41: Add guidance for creating a minimal reproduction example.

Consider adding instructions for creating and sharing a minimal reproduction example, which would help in faster issue resolution.

       label: "Reproduction steps"
       description: "List each step required to reproduce the bug."
+      placeholder: |
+        1. Provide a minimal configuration example
+        2. List detailed steps to reproduce the issue
+        3. Include example log messages or code if applicable
+        
+        For faster resolution, consider providing a minimal GitHub repository that reproduces the issue.
     validations:
       required: true
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 22c0d84 and c515724.

📒 Files selected for processing (4)
  • .github/ISSUE_TEMPLATE/bug-report.yaml (1 hunks)
  • .github/ISSUE_TEMPLATE/config.yaml (1 hunks)
  • .github/ISSUE_TEMPLATE/feature-request.yaml (1 hunks)
  • .github/PULL_REQUEST_TEMPLATE.md (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • .github/ISSUE_TEMPLATE/config.yaml
  • .github/PULL_REQUEST_TEMPLATE.md
🔇 Additional comments (1)
.github/ISSUE_TEMPLATE/feature-request.yaml (1)

1-3: LGTM! Clear and well-structured metadata.

The template's metadata is properly configured with a descriptive name, clear description, and appropriate enhancement label.

Comment on lines +5 to +11
- type: "markdown"
attributes:
value: |
Use this form to report any functional or performance bugs you've found in the software.

Be sure to check if your [issue](https://github.com/y-scope/log4j2-appenders/issues) has
already been reported.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Enhance instructions with log submission guidelines.

Consider adding guidance about including relevant logs, error messages, and stack traces when applicable. This would help in faster issue resolution.

         Use this form to report any functional or performance bugs you've found in the software.

         Be sure to check if your (https://github.com/y-scope/log4j2-appenders/issues) has
         already been reported.
+
+        When submitting logs or error messages:
+        - Include relevant log snippets with timestamps
+        - Include complete stack traces if available
+        - Remove any sensitive information

Committable suggestion was skipped due to low confidence.

Comment on lines +1 to +3
name: "Bug Report"
description: "Report software deficiencies"
labels: ["bug"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider adding severity labels for better issue prioritization.

While the "bug" label is appropriate, consider adding optional severity labels (e.g., "severity/critical", "severity/major", "severity/minor") to help with issue triage and prioritization.

 name: "Bug Report"
 description: "Report software deficiencies"
-labels: ["bug"]
+labels: ["bug", "needs-triage"]

Committable suggestion was skipped due to low confidence.

Comment on lines +20 to +26
- type: "input"
attributes:
label: "log4j2-appenders version"
description: "The release version number or development commit hash that has the bug."
placeholder: "Version number or commit hash"
validations:
required: true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add version format validation.

Consider adding a pattern validation to ensure version numbers follow semantic versioning format or are valid commit hashes.

       label: "log4j2-appenders version"
       description: "The release version number or development commit hash that has the bug."
       placeholder: "Version number or commit hash"
+      pattern: "^(\\d+\\.\\d+\\.\\d+(-[\\w.]+)?|[0-9a-f]{7,40})$"
+      pattern_error: "Please enter a valid semantic version (e.g., 1.0.0) or git commit hash"
     validations:
       required: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- type: "input"
attributes:
label: "log4j2-appenders version"
description: "The release version number or development commit hash that has the bug."
placeholder: "Version number or commit hash"
validations:
required: true
- type: "input"
attributes:
label: "log4j2-appenders version"
description: "The release version number or development commit hash that has the bug."
placeholder: "Version number or commit hash"
pattern: "^(\\d+\\.\\d+\\.\\d+(-[\\w.]+)?|[0-9a-f]{7,40})$"
pattern_error: "Please enter a valid semantic version (e.g., 1.0.0) or git commit hash"
validations:
required: true

@jackluo923 jackluo923 self-requested a review October 29, 2024 13:14
@jackluo923 jackluo923 merged commit dc8421d into y-scope:main Oct 29, 2024
1 check passed
@kirkrodrigues kirkrodrigues deleted the add-issue-templates branch October 29, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants