-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Configure Renovate #4887
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
base: master
Are you sure you want to change the base?
Configure Renovate #4887
Conversation
Renovate has support for updating the |
@harshil21 Yes, please 😍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python-telegram-bot/.github/workflows/unit_tests.yml
Lines 12 to 15 in 6752547
schedule: | |
# Run monday and friday morning at 03:07 - odd time to spread load on GitHub Actions | |
- cron: '7 3 * * 1,5' | |
this can then also be removed IMO as discussed in #4796 (comment)
Only thing Renovate is complaining about are chango and pyright-type-completeness job's @Bibo-Joshi you might want to check if you can fix it? |
Branch Conflicted |
# Conflicts: # .pre-commit-config.yaml
I'm happy with the current configuration. The only thing I can't seem to get working is making Renovate update both pre-commit version and pyproject version of a dependency in the same PR. If any one of you can get that working, that would be great. I couldn't find any other projects which do that (maybe a global github search will help?) Renovate doesn't tell me here if it would also update the lockfile with the dependency in the same PR, I hope it would. |
You can check if this PR created by Renovate is the way you want it: The configuration is also very straightforward: |
Thanks @vivodi that PR is what I want indeed. I noticed:
|
What do you mean? In the Renovate PR I linked above,
Renovate can’t do this automatically because it has no way of knowing which Python package on PyPI corresponds to which GitHub repository. You can only group them together manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Renovate configuration still needs adjustment/improvement, and many parts can be simplified.
It is recommended to add https://github.com/renovatebot/pre-commit-hooks to prevent future erroneous changes to the Renovate configuration. |
Thanks for the review @vivodi! I had another question - would
Uff yes 🤦🏽♂️ remind me to not open github on mobile when I'm away from a keyboard Some more configuration decisions:
|
It seems that I can't use that new pre-commit hook - running into renovatebot/pre-commit-hooks#2983. Reverting. Perhaps schema validation inside IDE's should do. |
The python-telegram-bot repository doesn’t use semantic commits, so you don’t need to worry about this — meaning you don’t need to manually group these dependencies together.
Since you don't know of any case where you would want to do this at the moment, I suggest not using the “Tell Renovate to ask for approval before creating a Pull Request” feature, as it often causes you to forget to update. There’s nothing wrong with letting Renovate always create updates automatically.
Regarding automatic updates, you can take a look at the Renovate settings in the FlexGet repository, which were mainly written by me: https://github.com/Flexget/Flexget/blob/d0137d8dc87fa8dbb8fc394d67275e272fce052a/.github/renovate.json5#L5-L6 If the python-telegram-bot repository hasn’t enabled “allow auto-merge” in its settings, automatic merging will only occur if all checks pass. Otherwise, you’ll need to set all checks to “Required.”
Renovate config validation can be done via GitHub Actions — you can check how it’s set up in the FlexGet repository. Restricting the trigger conditions won’t add any overhead. https://github.com/Flexget/Flexget/blob/develop/.github/workflows/renovate-config-validation.yml |
// Let Renovate decide how to update. See docs: https://docs.renovatebot.com/configuration-options/#rangestrategy | ||
"rangeStrategy": "auto", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Let Renovate decide how to update. See docs: https://docs.renovatebot.com/configuration-options/#rangestrategy | |
"rangeStrategy": "auto", |
There’s no need to explicitly specify when using the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case I do want to explicitly mention it so anybody reading it is aware of our setting.
], | ||
|
||
// Increase the number of PR's Renovate can create in a hour. Default is 2. | ||
"prHourlyLimit": 5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using presets is convenient, and there's nothing wrong with creating all PRs at once.
':prConcurrentLimitNone',
':prHourlyLimitNone',
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the fence with this one. I don't really want to spam everything at once because our CI has flaky tests which fail when many PRs are opened at once.
If Renovate has an option of spacing out PRs by a set amount of time, say 30 minutes, that would be better imo.
I don't want to use more action minutes, some jobs already don't start instantly and wait for others to complete. I will instead use the skip config option in pre-commit.ci, so it won't run on CI but only locally.
Thanks for the explanation. |
We discussed a little more internally and decided to remove the pre-commit check locally too, since it would not be very useful. Any changes to the configuration would be in a new PR as outlined in the docs - https://docs.renovatebot.com/getting-started/installing-onboarding/#reconfigure-via-pr so invalid changes would be caught there too... |
Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.
🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.
Detected Package Files
.github/workflows/chango.yml
(github-actions).github/workflows/copilot-setup-steps.yml
(github-actions).github/workflows/docs-admonitions.yml
(github-actions).github/workflows/docs-linkcheck.yml
(github-actions).github/workflows/gha_security.yml
(github-actions).github/workflows/labelling.yml
(github-actions).github/workflows/lock.yml
(github-actions).github/workflows/release_pypi.yml
(github-actions).github/workflows/release_test_pypi.yml
(github-actions).github/workflows/stale.yml
(github-actions).github/workflows/test_official.yml
(github-actions).github/workflows/type_completeness.yml
(github-actions).github/workflows/type_completeness_monthly.yml
(github-actions).github/workflows/unit_tests.yml
(github-actions)pyproject.toml
(pep621).pre-commit-config.yaml
(pre-commit)Configuration Summary
Based on the default config's presets, Renovate will:
fix
for dependencies andchore
for all others if semantic commits are in use.node_modules
,bower_components
,vendor
and various test/tests (except for nuget) directories.github-action
digests.🔡 Do you want to change how Renovate upgrades your dependencies? Add your custom config to
renovate.json
in this branch. Renovate will update the Pull Request description the next time it runs.What to Expect
With your current configuration, Renovate will create 15 Pull Requests:
Update astral-sh/setup-uv digest to c0e7e93
renovate/astral-sh-setup-uv-digest
master
c0e7e93474eb09a343746f2a2742979d0cba523c
Update dependency astral-sh/uv to v0.8.11
renovate/astral-sh-uv-0.x
master
0.8.11
Update github/codeql-action action to v3.29.9
renovate/github-codeql-action-3.x
master
df559355d593797519d70b90fc8edd5db049e7a2
Update Pylint to v3.3.8
renovate/pylint
master
v3.3.8
==3.3.8
Update Ruff to v0.12.9
renovate/ruff
master
v0.12.9
==0.12.9
Update actions/checkout action to v4.3.0
renovate/actions-checkout-4.x
master
08eba0b27e820071cde6df949e0beb9ba4906955
Update astral-sh/setup-uv action to v6.5.0
renovate/astral-sh-setup-uv-6.x
master
d9e0f98d3fc6adb07d1e3d37f3043649ddad06a1
Update Chango to v0.5.0
renovate/chango
master
212fc662da1b1026f335e110270d75690df05758
~=0.5.0
Update Mypy to v1.17.1
renovate/mypy
master
==1.17.1
v1.17.1
Update pre-commit hook APScheduler to ~=3.11.0
renovate/apscheduler-3.x
master
~=3.11.0
Update pre-commit hook cachetools to >=5.5.2,<5.6.0
renovate/cachetools-5.x
master
>=5.5.2,<5.6.0
Update actions/checkout action to v5
renovate/actions-checkout-5.x
master
08c6903cd8c0fde910a37f88322edcfb5dd907a8
Update actions/download-artifact action to v5
renovate/major-github-artifact-actions
master
634f93cb2916e3fdff6788551b99b062d0335ce0
Update pre-commit hook cachetools to v6
renovate/cachetools-6.x
master
>=6.1.0,<6.2.0
Lock file maintenance
renovate/lock-file-maintenance
master
❓ Got questions? Check out Renovate's Docs, particularly the Getting Started section.
If you need any further assistance then you can also request help here.
This PR was generated by Mend Renovate. View the repository job log.