Skip to content

Use Mergify for PR Size Comments - #1099

Merged
Erik Osterman (Cloud Posse) (osterman) merged 10 commits into
mainfrom
fixes-labeler
Feb 28, 2025
Merged

Erik Osterman (Cloud Posse) (osterman) merged 10 commits into
mainfrom
fixes-labeler

Conversation

@Cerebrovinny

@Cerebrovinny Vinicius C. (Cerebrovinny) commented Feb 28, 2025 •

Copy link
Copy Markdown
Contributor

what

why

references

Summary by CodeRabbit

  • New Features
    • Added a comment notification for pull requests labeled with size/xl, advising authors on the challenges of large pull requests and encouraging smaller, focused submissions.
  • Chores
    • Updated the version of the PR Size Labeler action for improved functionality.
    • Reformatted parameters in the PR Size Labeler job for better readability.

@Cerebrovinny
Vinicius C. (Cerebrovinny) marked this pull request as ready for review February 28, 2025 21:39
@Cerebrovinny
Vinicius C. (Cerebrovinny) requested a review from a team as a code owner February 28, 2025 21:39
@mergify

mergify Bot commented Feb 28, 2025

Copy link
Copy Markdown
Contributor

Important

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

@mergify mergify Bot added the needs-cloudposse Needs Cloud Posse assistance label Feb 28, 2025
@coderabbitai

coderabbitai Bot commented Feb 28, 2025 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This change updates the GitHub Actions workflow defined in the .github/workflows/codeql.yml file. The pr-size-labeler job has had its formatting modified, including changes to the files_to_ignore and message_if_xl parameters, which are now presented in a single line format. A comment indicating that the job only runs on pull requests has been removed, but the overall structure and functionality remain unchanged. Additionally, a new rule has been added to the .github/mergify.yml file to trigger a comment when a pull request is labeled with size/xl.

Changes

File Change Summary
.github/.../codeql.yml - Parameter format updates: files_to_ignore changed from multi-line to single line.
- message_if_xl parameter removed.
- Removed comment about job running on pull requests.
.github/.../mergify.yml - New rule added to trigger a comment when size/xl label is present, warning about the pull request size.

Sequence Diagram(s)

sequenceDiagram
  participant PR as "Pull Request Event"
  participant WF as "GitHub Workflow"
  participant SL as "PR Size Labeler"
  participant M as "Mergify"

  PR->>WF: Trigger workflow on PR
  WF->>SL: Execute PR Size Labeler step
  SL-->>WF: Return size data
  PR->>M: Add label size/xl
  M-->>PR: Post warning comment about size
Loading

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f96d352 and 76bc067.

📒 Files selected for processing (2)
  • .github/mergify.yml (1 hunks)
  • .github/workflows/codeql.yml (2 hunks)

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 generate docstrings to generate docstrings for this 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 or @auto-summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @auto-title anywhere in the PR title to generate the title automatically.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
.github/workflows/codeql.yml (3)

79-79: Remove trailing whitespace.
There are extra spaces at the end of line 79. Please remove them to meet YAML linting standards.

-      
+ 
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 79-79: trailing spaces

(trailing-spaces)


98-98: Remove trailing whitespace.
Trailing spaces were detected on this line—please remove them to ensure the YAML file complies with formatting guidelines.

-          
+ 
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 98-98: trailing spaces

(trailing-spaces)


99-117: Verify "PR Size Warning Comment" Conditions and Messaging.
This step is set to execute when steps.size-labeler.outputs.size == 's', yet the warning message refers to exceeding a 1,000 line limit, which seems inconsistent given that a size 's' label typically corresponds to a much smaller range. Please review whether the condition should trigger for a larger PR size (perhaps 'l' or 'xl') or if the message needs to be updated accordingly.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 126c251 and 3e746a2.

📒 Files selected for processing (1)
  • .github/workflows/codeql.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/codeql.yml

[error] 79-79: trailing spaces

(trailing-spaces)


[error] 98-98: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Summary
🔇 Additional comments (1)
.github/workflows/codeql.yml (1)

80-97: New "PR Size Labeler (Labels Only)" Step Configuration.
The newly added step appears to correctly invoke the codelytv/pr-size-labeler@v1 action with appropriate parameters for labeling pull requests. Just make sure that the thresholds (e.g., xs_max_size, s_max_size, etc.) align with your intended sizing categories.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 28, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/codeql.yml (1)

79-79: Remove Trailing Spaces.
There are trailing spaces on line 79 which trigger YAML lint errors. Please remove any unnecessary trailing whitespace.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 79-79: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3e746a2 and f96d352.

📒 Files selected for processing (1)
  • .github/workflows/codeql.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/codeql.yml

[error] 79-79: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Analyze (go)
  • GitHub Check: Summary
🔇 Additional comments (2)
.github/workflows/codeql.yml (2)

94-94: Consolidated Files to Ignore Format.
The files_to_ignore parameter has been reformatted to a single-line space-separated string. Please verify that this format meets the expected input for the action and correctly ignores all specified files.


97-97: Unified Message Formatting.
The message_if_xl parameter is now a single-line string introducing newline escape sequences for formatting. Confirm that the message renders as intended during execution.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 28, 2025
@github-actions github-actions Bot added size/s and removed size/xl labels Feb 28, 2025
@github-actions github-actions Bot added size/s and removed size/xl labels Feb 28, 2025
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
@github-actions github-actions Bot added size/xl and removed size/s labels Feb 28, 2025
coderabbitai[bot]
coderabbitai Bot previously approved these changes Feb 28, 2025
@osterman Erik Osterman (Cloud Posse) (osterman) added the no-release Do not create a new release (wait for additional code changes) label Feb 28, 2025
@osterman Erik Osterman (Cloud Posse) (osterman) changed the title Fixes labeler Use Mergify for PR Size Comments Feb 28, 2025
@mergify mergify Bot removed the needs-cloudposse Needs Cloud Posse assistance label Feb 28, 2025
Vinicius C. (Cerebrovinny) added a commit that referenced this pull request Mar 1, 2025
* fix comment and line breaks

* comment test

* test changes

* this should not trigger another one

* fix multiple msg

* fix multiple msg

* remove test file

* Update .github/workflows/codeql.yml

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>

* add test file

* delete test file

---------

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
@github-actions

github-actions Bot commented Mar 1, 2025

Copy link
Copy Markdown

These changes were released in v1.165.0.

Erik Osterman (Cloud Posse) (osterman) added a commit that referenced this pull request Mar 2, 2025
* fix permissions

* codecov

* Implement PR Size Labeler (#1098)

* added PR size labeler

* fix permissions

* fix permissions

* Apply suggestions from code review

---------

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>

* Use Mergify for PR Size Comments (#1099)

* fix comment and line breaks

* comment test

* test changes

* this should not trigger another one

* fix multiple msg

* fix multiple msg

* remove test file

* Update .github/workflows/codeql.yml

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>

* add test file

* delete test file

---------

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>

* fix: coverage run

* clean up codecov

* fix path

* add comment

* add comment

* fix path debug

* fix path part 2

* test config cov

* test config cov

* test config cov

* test config cov

* test codecov config

* update ci

* Update codecov.yml

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>

* remove coverage file

* unify tests

* fix action codecov issue

* Update codecov.yml

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>

* Update .github/workflows/test.yml

* Update test.yml

* Update test.yml

* Update codecov.yml

---------

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-release Do not create a new release (wait for additional code changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants