-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from Ableton/renovate/configure
Configure Renovate
- Loading branch information
Showing
3 changed files
with
38 additions
and
8 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"constraints": {"python": "3.10.6"}, | ||
"extends": ["config:base"], | ||
"enabledManagers": ["ansible-galaxy", "pip-compile"], | ||
"pip-compile": {"fileMatch": ["^requirements-dev\\.in$"]} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
on: # yamllint disable-line rule:truthy | ||
pull_request_target: | ||
types: [opened, reopened] | ||
paths: | ||
- .python-version | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
update-python: | ||
runs-on: ubuntu-latest | ||
name: Update Python version used by renovate | ||
steps: | ||
- name: Post a reminder to update the Python version used by renovate | ||
shell: python | ||
# yamllint disable rule:line-length | ||
run: | | ||
import requests | ||
PR_NUM = ${{ github.event.pull_request.number }} | ||
REPO_SLUG = ${{ github.repository }} | ||
r = requests.post( | ||
f"https://api.github.com/repos/{REPO_SLUG}/issues/{PR_NUM}/comments", | ||
headers={"Authorization": "token ${{ github.token }}"}, | ||
json={"body": "Don't forget to update the Python version in `.github/renovate.json`"}, | ||
) | ||
r.raise_for_status() | ||
print(f"Posted comment on pull request {PR_NUM}") |