ci: GitHub action for conventional pull requests #5

Merged
matous-volf merged 2 commits from ci/conventional-pull-requests-check into main 2024-08-15 10:18:31 +00:00
matous-volf commented 2024-08-15 10:10:26 +00:00 (Migrated from github.com)

Summary by CodeRabbit

  • New Features

    • Introduced a validation workflow for pull request titles to ensure compliance with conventional commit standards.
  • Improvements

    • Enhanced pull request workflow responsiveness by allowing triggers for more events, improving integration and testing practices.
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a validation workflow for pull request titles to ensure compliance with conventional commit standards. - **Improvements** - Enhanced pull request workflow responsiveness by allowing triggers for more events, improving integration and testing practices. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
coderabbitai[bot] commented 2024-08-15 10:10:32 +00:00 (Migrated from github.com)

Walkthrough

This update enhances the GitHub Actions workflows by modifying the pull_request trigger in the conventional-commits.yml file to respond to a wider range of events. Additionally, a new workflow file, conventional-pull-requests.yml, is introduced to automate the validation of pull request titles against conventional commit standards. These changes improve CI/CD responsiveness and promote consistent commit message formatting across the repository.

Changes

Files Change Summary
.github/workflows/conventional-commits.yml Modified pull request triggers to include events: opened, synchronize, reopened, and edited.
.github/workflows/conventional-pull-requests.yml Introduced a new workflow for validating pull request titles against conventional commit standards using GitHub Actions.
  • matous-volf/todo-baggins#3: The new workflow for validating pull request titles aligns with the objectives of creating a GitHub action for conventional pull requests, addressing the need for standardized commit messages.

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.
<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- walkthrough_start --> ## Walkthrough This update enhances the GitHub Actions workflows by modifying the `pull_request` trigger in the `conventional-commits.yml` file to respond to a wider range of events. Additionally, a new workflow file, `conventional-pull-requests.yml`, is introduced to automate the validation of pull request titles against conventional commit standards. These changes improve CI/CD responsiveness and promote consistent commit message formatting across the repository. ## Changes | Files | Change Summary | |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------| | `.github/workflows/conventional-commits.yml` | Modified pull request triggers to include events: `opened`, `synchronize`, `reopened`, and `edited`. | | `.github/workflows/conventional-pull-requests.yml`| Introduced a new workflow for validating pull request titles against conventional commit standards using GitHub Actions.| ## Possibly related issues - **matous-volf/todo-baggins#3**: The new workflow for validating pull request titles aligns with the objectives of creating a GitHub action for conventional pull requests, addressing the need for standardized commit messages. <!-- walkthrough_end --><!-- This is an auto-generated comment: raw summary by coderabbit.ai --> <!-- .github/workflows/conventional-commits.yml: ## AI-generated summary of changes The diff reflects a modification to the event triggers for the `pull_request` workflow in the `.github/workflows/conventional-commits.yml` file. Previously, the workflow was configured to activate solely on the `main` branch when a pull request was made. The change broadens the scope of the workflow's activation by replacing the specific branch trigger with a set of event types: `opened`, `synchronize`, `reopened`, and `edited`. This adjustment allows the workflow to respond to a wider range of pull request activities, ensuring that it is executed not only when a pull request is initially created but also when it is updated or modified. This enhances the responsiveness of the CI/CD pipeline to changes in pull requests, facilitating better integration and testing practices. ## Alterations to the declarations of exported or public entities - `on: pull_request: branches: [ main ]` in `.github/workflows/conventional-commits.yml` → `on: pull_request: types: [ opened, synchronize, reopened, edited ]` in `.github/workflows/conventional-commits.yml` --- .github/workflows/conventional-pull-requests.yml: ## AI-generated summary of changes The newly introduced GitHub Actions workflow file, `conventional-pull-requests.yml`, automates the validation of pull request titles against conventional commit standards. This workflow triggers on specific pull request events, including when a pull request is opened, synchronized, reopened, or edited. The primary job defined within this workflow is `validate-pr-title`, which runs on an Ubuntu 22.04 environment. Within this job, a single step is executed that utilizes the `ytanikin/PRConventionalCommits` action, specifically version 1.1.0. This action is configured to validate the title of the pull request against a predefined list of task types, which includes categories such as build, chore, ci, docs, feat, fix, perf, refactor, revert, style, and test. The configuration specifies that no additional labels should be added to the pull request upon validation. The control flow of this workflow ensures that any pull request title adheres to the conventional commit format, thereby promoting consistency in commit messages across the repository. This can enhance clarity in the project's history and facilitate automated release processes, as well as integration with other tools that rely on standardized commit messages. ## Alterations to the declarations of exported or public entities - New workflow `conventional-pull-requests` in `.github/workflows/conventional-pull-requests.yml` --> <!-- end of auto-generated comment: raw summary by coderabbit.ai --><!-- This is an auto-generated comment: pr objectives by coderabbit.ai --> <!-- Title: ci: GitHub action for conventional pull requests Number: 5 User: matous-volf --> <!-- end of auto-generated comment: pr objectives by coderabbit.ai --><!-- commit_ids_reviewed_start --> <!-- 00de1385307446bbf27d1428202e3b5f4e5e0fd6 --> <!-- commit_ids_reviewed_end --><!-- tips_start --> --- <details> <summary>Tips</summary> ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit <commit_id>.` - `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 generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@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 as 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. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements. </details> <!-- tips_end -->
coderabbitai[bot] (Migrated from github.com) reviewed 2024-08-15 10:12:26 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

Commits

Files that changed from the base of the PR and between ed3e915518 and 00de138530.

Files selected for processing (2)
  • .github/workflows/conventional-commits.yml (1 hunks)
  • .github/workflows/conventional-pull-requests.yml (1 hunks)
Additional comments not posted (2)
.github/workflows/conventional-commits.yml (1)

5-5: LGTM! Broadened event triggers enhance CI/CD responsiveness.

The change to include multiple event types for the pull_request trigger ensures that the workflow is more responsive to pull request updates, which is a positive enhancement.

.github/workflows/conventional-pull-requests.yml (1)

1-15: LGTM! New workflow for PR title validation is well-configured.

The new workflow effectively validates pull request titles against conventional commit standards, promoting consistency in commit message formatting. The configuration is appropriate and aligns with the PR objectives.

**Actionable comments posted: 0** <details> <summary>Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: ASSERTIVE** <details> <summary>Commits</summary> Files that changed from the base of the PR and between ed3e915518fa5b838d9acb6b1d1ac7d1daa0022b and 00de1385307446bbf27d1428202e3b5f4e5e0fd6. </details> <details> <summary>Files selected for processing (2)</summary> * .github/workflows/conventional-commits.yml (1 hunks) * .github/workflows/conventional-pull-requests.yml (1 hunks) </details> <details> <summary>Additional comments not posted (2)</summary><blockquote> <details> <summary>.github/workflows/conventional-commits.yml (1)</summary><blockquote> `5-5`: **LGTM! Broadened event triggers enhance CI/CD responsiveness.** The change to include multiple event types for the `pull_request` trigger ensures that the workflow is more responsive to pull request updates, which is a positive enhancement. </blockquote></details> <details> <summary>.github/workflows/conventional-pull-requests.yml (1)</summary><blockquote> `1-15`: **LGTM! New workflow for PR title validation is well-configured.** The new workflow effectively validates pull request titles against conventional commit standards, promoting consistency in commit message formatting. The configuration is appropriate and aligns with the PR objectives. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
coderabbitai[bot] (Migrated from github.com) approved these changes 2024-08-15 10:12:29 +00:00
Sign in to join this conversation.
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: matous-volf/todo-baggins#5
No description provided.