Skip to content

Conversation

@mrhoribu
Copy link
Contributor

@mrhoribu mrhoribu commented Nov 4, 2025

Added permissions for GitHub Actions and improved the workflow to handle changed files more effectively, including auto-correction and committing changes.


Important

Enhances Rubocop workflow with permissions, improved file change detection, and automated corrections and commits, while respecting protected branches.

  • Permissions:
    • Added contents: write permission to .github/workflows/rubocop_syntax_checker.yaml.
  • File Change Detection:
    • Improved detection of changed files using git diff and filtering for .rb, .rbw, and .lic extensions.
    • Handles new branches by comparing with the default branch.
  • Autocorrection and Commit:
    • Runs rubocop -a on changed files and commits changes if not on protected branches (master or main).
    • Configures Git user for commits as github-actions[bot].
    • Skips auto-commit on protected branches and logs errors if changes are needed.
  • Misc:
    • Updated job steps for clarity and added logging for actions taken.

This description was created by Ellipsis for 6f54897. You can customize this summary. It will automatically update as commits are pushed.

Added permissions for GitHub Actions and improved the workflow to handle changed files more effectively, including auto-correction and committing changes.
ellipsis-dev[bot]

This comment was marked as outdated.

@mrhoribu

This comment was marked as outdated.

ellipsis-dev[bot]

This comment was marked as outdated.

Refactor GitHub Actions workflow to improve push handling for Rubocop autocorrections, including better error handling for protected branches.
@mrhoribu

This comment was marked as outdated.

ellipsis-dev[bot]

This comment was marked as outdated.

@mrhoribu

This comment was marked as outdated.

ellipsis-dev[bot]

This comment was marked as outdated.

@mrhoribu mrhoribu marked this pull request as draft November 4, 2025 16:44
Updated Rubocop workflow to simplify branch handling and remove unnecessary checks.
@mrhoribu
Copy link
Contributor Author

mrhoribu commented Nov 4, 2025

@ellipsis remove previous comments and review again

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 6f54897 in 4 minutes and 39 seconds. Click for details.
  • Reviewed 162 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/rubocop_syntax_checker.yaml:21
  • Draft comment:
    Consider using a semantic version tag (e.g. 'v5.0.0') instead of a commit SHA for actions/checkout for better maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. .github/workflows/rubocop_syntax_checker.yaml:40
  • Draft comment:
    Ensure that the default branch detection via 'git symbolic-ref' reliably works in all repository configurations.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. .github/workflows/rubocop_syntax_checker.yaml:53
  • Draft comment:
    Verify that including files with the '.lic' extension in the Rubocop filtering is intentional.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. .github/workflows/rubocop_syntax_checker.yaml:68
  • Draft comment:
    Autocorrect errors are being suppressed with a warning. Confirm that continuing execution despite autocorrect issues is acceptable.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. .github/workflows/rubocop_syntax_checker.yaml:80
  • Draft comment:
    Double-check that skipping auto-commit on 'master' and 'main' aligns with your branch protection policy.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
6. .github/workflows/rubocop_syntax_checker.yaml:99
  • Draft comment:
    When pushing changes, consider more granular error handling and cleanup (e.g. removing temporary files) to make debugging easier on push failures.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_rjdhZCGlljL3Y3rv

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

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