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

feat: ⚡ Allows also empty commits #1487

Merged
merged 1 commit into from
Aug 11, 2024
Merged

feat: ⚡ Allows also empty commits #1487

merged 1 commit into from
Aug 11, 2024

Conversation

Anselmoo
Copy link
Owner

@Anselmoo Anselmoo commented Aug 11, 2024

All PR-Submissions:


  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open
    Pull Requests for the same
    update/change?

New ✨✨ Feature-Submissions:


  • Does your submission pass tests?
  • Have you lint your code locally prior to submission? Fixed:
  • This PR is for a new feature, not a bug fix.

Changes to ⚙️ Core-Features:


  • Have you added an explanation of what your changes do and why you'd like
    us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

Summary by Sourcery

Enable empty commits in the weekly Poetry update workflow when no dependency updates are detected, and include update logs in commit messages when updates are present. Revert the cron schedule to run every Sunday at midnight.

New Features:

  • Allow creation of empty commits when no dependency updates are detected.

Enhancements:

  • Include update logs in commit messages when dependency updates are detected.

CI:

  • Revert the cron schedule for the weekly Poetry update workflow to run every Sunday at midnight.

@Anselmoo Anselmoo enabled auto-merge August 11, 2024 12:36
Copy link

Review changes with SemanticDiff.

Copy link
Contributor

sourcery-ai bot commented Aug 11, 2024

Reviewer's Guide by Sourcery

This pull request updates the 'weekly-poetry-bot' GitHub Actions workflow. The cron schedule is changed to run every Sunday at midnight. The 'Update dependencies' step now logs output to 'poetry-update.log'. The 'Create new branch' step is modified to add only 'poetry.lock' and includes logic to create an empty commit if no changes are detected, otherwise, it includes the update log in the commit message.

File-Level Changes

Files Changes
.github/workflows/weekly-poetry-bot.yml Updated the workflow to handle empty commits and improved logging for dependency updates.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

@github-actions github-actions bot added the github-actions Pull requests that update Github_actions code label Aug 11, 2024
Copy link

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Anselmoo - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Please fill out the PR description template to provide more context about your changes.
  • Consider simplifying the log handling. Instead of using tee and then reading the file, you could capture the output directly in a variable.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -30,15 +29,22 @@ jobs:
run: poetry install

- name: Update dependencies
run: poetry update
run: poetry update | tee poetry-update.log
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (bug_risk): Log file name inconsistency may lead to empty commit messages

The update log is saved as 'poetry-update.log', but later in the script, it's referred to as 'update.log'. This inconsistency could result in empty commit messages as the correct file won't be read.

Copy link

codecov bot commented Aug 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (0152b5c) to head (23e074e).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1487   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           44        44           
  Lines         4467      4467           
=========================================
  Hits          4467      4467           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@Anselmoo Anselmoo merged commit 66dc2ee into main Aug 11, 2024
49 checks passed
@Anselmoo Anselmoo deleted the feature/updat-via-empty branch August 11, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-actions Pull requests that update Github_actions code size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant