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

chore: Update weekly-poetry-bot.yml #1507

Merged
merged 2 commits into from
Aug 25, 2024
Merged

chore: Update weekly-poetry-bot.yml #1507

merged 2 commits into from
Aug 25, 2024

Conversation

Anselmoo
Copy link
Owner

@Anselmoo Anselmoo commented Aug 25, 2024

This pull request includes two commits. The first commit updates the schedule of the weekly-poetry-bot workflow to run every hour instead of every Sunday at midnight; just for testing

Summary by Sourcery

Modify the weekly-poetry-bot CI workflow to run hourly and switch to using the GitHub CLI for creating pull requests.

CI:

  • Update the schedule of the weekly-poetry-bot workflow to run every hour instead of every Sunday at midnight for testing purposes.
  • Replace the use of the 'peter-evans/create-pull-request' action with a custom script using the GitHub CLI to create pull requests.

Copy link
Contributor

sourcery-ai bot commented Aug 25, 2024

Reviewer's Guide by Sourcery

This pull request updates the weekly-poetry-bot workflow to run every hour instead of weekly, and modifies the pull request creation process to use the GitHub CLI instead of an action. It also updates the GitHub token used for creating and merging pull requests.

File-Level Changes

Change Details Files
Modified the workflow schedule to run hourly
  • Commented out the previous weekly schedule
  • Added a new cron job to run every hour
.github/workflows/weekly-poetry-bot.yml
Replaced the pull request creation action with GitHub CLI commands
  • Removed the 'Create Pull Request' step using peter-evans/create-pull-request action
  • Added a new step to create pull requests using 'gh pr create' command
  • Updated the pull request title and body
  • Changed the GitHub token used for creating pull requests
.github/workflows/weekly-poetry-bot.yml
Updated the GitHub token used for merging pull requests
  • Changed the GITHUB_TOKEN from secrets.GITHUB_TOKEN to secrets.auto_changelog
.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

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 found some issues that need to be addressed.

Blocking issues:

  • Reconsider the frequency of dependency updates (link)

Overall Comments:

  • The cron schedule has been changed from weekly to hourly. While this is noted as being for testing purposes, please ensure this is reverted before merging to production to avoid potential issues with excessive bot runs.
  • The authentication method has been changed from using the default GITHUB_TOKEN to a custom auto_changelog secret. Please confirm that this new token has the necessary permissions and doesn't introduce any security risks.
Here's what I looked at during the review
  • 🔴 General issues: 1 blocking issue
  • 🟢 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.

@@ -2,7 +2,8 @@ name: Weekly Poetry Update

on:
schedule:
- cron: '0 0 * * 0' # Runs every Sunday at midnight
# - cron: '0 0 * * 0' # Runs every Sunday at midnight
- cron: '0 * * * *' # Runs every hour
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (performance): Reconsider the frequency of dependency updates

The cron schedule has been changed from weekly to hourly. This seems excessive for a dependency update task and could lead to unnecessary resource consumption and potential API rate limiting issues. Consider reverting to a less frequent schedule, such as weekly or daily, unless there's a specific reason for hourly updates.

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 (8e45af8) to head (af6cde2).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1507   +/-   ##
=========================================
  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 70e77d5 into main Aug 25, 2024
33 checks passed
@Anselmoo Anselmoo deleted the fix/weekly-update branch August 25, 2024 09:36
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