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

fix: 💚 Refactoring weekly-poetry-bot.yml #1511

Merged
merged 1 commit into from
Aug 25, 2024
Merged

Conversation

Anselmoo
Copy link
Owner

@Anselmoo Anselmoo commented Aug 25, 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

Refactor the weekly-poetry-bot.yml workflow to improve the process of updating dependencies by adjusting the schedule, handling branch creation, and ensuring proper commit and push operations. Update the GitHub token usage for better security practices.

CI:

  • Refactor the weekly-poetry-bot.yml workflow to run the update job every Sunday at midnight instead of every hour.
  • Add a step to create a new branch for dependency updates before installing and updating dependencies.
  • Modify the commit step to handle cases where the update log file might not exist.
  • Add a step to push changes to the newly created branch.
  • Update the GitHub token environment variable to use secrets.GITHUB_TOKEN instead of secrets.auto_changelog.

Copy link

Review changes with SemanticDiff.

Copy link
Contributor

sourcery-ai bot commented Aug 25, 2024

Reviewer's Guide by Sourcery

This pull request refactors the weekly-poetry-bot.yml workflow file to improve the automation process for updating dependencies. The changes include adjusting the schedule, reorganizing the steps for better flow, improving error handling, and updating the GitHub token usage.

File-Level Changes

Change Details Files
Adjusted the schedule for running the workflow
  • Changed from running every hour to running every Sunday at midnight
.github/workflows/weekly-poetry-bot.yml
Reorganized the workflow steps for a more logical flow
  • Moved the 'Create new branch' step before installing dependencies
  • Separated 'Commit changes' and 'Push changes' into distinct steps
.github/workflows/weekly-poetry-bot.yml
Improved error handling and logging in the update process
  • Added a check for the existence of the poetry-update.log file
  • Provided a fallback message when the update log is not available
.github/workflows/weekly-poetry-bot.yml
Updated GitHub token usage
  • Changed from using a custom 'auto_changelog' secret to the default 'GITHUB_TOKEN'
.github/workflows/weekly-poetry-bot.yml
Improved the Pull Request creation command
  • Reformatted the 'gh pr create' command for better readability
  • Split the command into multiple lines using backslashes
.github/workflows/weekly-poetry-bot.yml

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 25, 2024
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 and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 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.

Copy link

Copy link

codecov bot commented Aug 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (f4efe5a) to head (3aa6aa6).
Report is 2 commits behind head on main.

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

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

@Anselmoo Anselmoo merged commit e22a943 into main Aug 25, 2024
33 checks passed
@Anselmoo Anselmoo deleted the fix/weekly-updater branch August 25, 2024 19:40
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/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant