Skip to content

Commit

Permalink
Merge pull request #59 from Ableton/renovate/configure
Browse files Browse the repository at this point in the history
Configure Renovate
  • Loading branch information
nre-ableton authored Oct 24, 2022
2 parents 17e8e3c + 1ffccec commit 1a34d6d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/dependabot.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/renovate.json
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$"]}
}
31 changes: 31 additions & 0 deletions .github/workflows/update-python.yml
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}")

0 comments on commit 1a34d6d

Please sign in to comment.