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

introduce notes-start-tag option #1141

Merged
merged 7 commits into from
Jan 22, 2024
Merged

introduce notes-start-tag option #1141

merged 7 commits into from
Jan 22, 2024

Conversation

shogo82148
Copy link
Owner

@shogo82148 shogo82148 commented Jan 22, 2024

close #918

Summary by CodeRabbit

  • New Features
    • Added a new parameter notes_start_tag for release note generation.
    • Introduce new interfaces and method for generating release notes.

Copy link

coderabbitai bot commented Jan 22, 2024

Warning

Rate Limit Exceeded

@shogo82148 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 33 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 192511f and e6ed2b8.

Walkthrough

The recent update introduces a new feature for the GitHub CLI, specifically the ability to specify a notes-start-tag for generating release notes. This allows users to define a starting point tag, improving the flexibility and accuracy of release documentation. The README has been updated to reflect this new functionality. The changes also include modifications to various files to support the new notes-start-tag feature.

Changes

File Change Summary
README.md Added a new section for notes-start-tag in the release notes generation and updated the docs
__tests__/create.test.ts Added a new parameter notes_start_tag with an empty string as its default value in the function calls for creating and overwriting releases
src/create-release.ts Significantly altered the create function to introduce new options, adjust the handling of release notes, and modify the logic for generating release bodies
src/create.ts Modified the run function to include the notes_start_tag parameter and use it in the createRelease function call, and commented out the discussion_category_name parameter
src/github-mini.ts Introduced new interfaces GenerateReleaseNotesParams and GenerateReleaseNotesResponse for generating release notes, and added a new method generateReleaseNotes to the Client class

Assessment against linked issues

Objective Addressed Explanation
Support notes-start-tag input for release notes generation (#918)

Poem

In the code garden, changes bloom,
A tag now marks the starting room.
With notes that start from where we tag,
We hop along, no need to lag. 🐇💻

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>.
    • Generate unit-tests for this file.
  • 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 tests 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 from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

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

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 88e2b82 and 926ec57.
Files ignored due to path filters (1)
  • action.yml is excluded by: !**/*.yml
Files selected for processing (1)
  • README.md (1 hunks)
Additional comments: 1
README.md (1)
  • 91-94: The addition of the notes-start-tag input option is correctly documented under the Inputs section. Ensure that the description is clear and provides enough information for users to understand its purpose and how to use it.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 926ec57 and 192511f.
Files selected for processing (4)
  • tests/create.test.ts (4 hunks)
  • src/create-release.ts (4 hunks)
  • src/create.ts (2 hunks)
  • src/github-mini.ts (2 hunks)
Additional comments: 15
src/create.ts (2)
  • 24-24: The addition of notes_start_tag is consistent with the PR's objective to introduce a notes-start-tag input option. Ensure that the input is properly validated before use.
  • 45-45: The notes_start_tag parameter is correctly passed to the create function. This change aligns with the new feature implementation.
src/create-release.ts (6)
  • 2-2: The switch from fs to fs/promises indicates a move to promise-based filesystem operations, which is a modernization of the codebase.
  • 19-19: The notes_start_tag property has been added to the Options interface, which is necessary for the new feature to function correctly.
  • 43-43: The use of const for target_commitish is appropriate since it's not reassigned later. This change improves code clarity.
  • 44-44: Similarly, discussion_category_name is now a constant, which is a good practice when the variable is not modified.
  • 49-49: The variable generate_release_notes is set to false by default, which is a change in behavior. Ensure that this change is intentional and documented.
  • 57-74: The logic for generating release notes has been modified to include the notes_start_tag. Ensure that this new logic is thoroughly tested, especially the conditional paths.
src/github-mini.ts (3)
  • 103-110: New interface GenerateReleaseNotesParams is introduced to encapsulate parameters for the release notes generation feature.
  • 112-115: The GenerateReleaseNotesResponse interface is correctly defined to handle the response from the release notes generation.
  • 198-214: The generateReleaseNotes method is added to the Client class, which is necessary for the new feature to interact with the GitHub API.
__tests__/create.test.ts (4)
  • 45-45: The notes_start_tag parameter is added with a default empty string value in test cases. Ensure that tests are also added to cover non-empty and edge case values.
  • 128-128: The notes_start_tag parameter is correctly included in the test for overwriting an existing release.
  • 225-225: The notes_start_tag parameter is included in the test for overwriting an existing release and tag. Ensure that the behavior when notes_start_tag is provided is tested.
  • 298-298: The addition of notes_start_tag in the test for overwriting a non-existing release is consistent with the changes. Ensure that tests cover scenarios where the tag does not exist.

@shogo82148 shogo82148 merged commit ae10d16 into main Jan 22, 2024
13 checks passed
@shogo82148 shogo82148 deleted the implement-notes-start-tag branch January 22, 2024 15:41
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.

support notes-start-tag input
1 participant